-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools: add --prof-process flag to node binary
This change cleans up outstanding comments on #3032. It improves error handling when no isolate file is provided and adds the --prof-process flag to the node binary which executes the tick processor on the provided isolate file. PR-URL: #4021 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Evan Lucas <[email protected]>
- Loading branch information
Showing
12 changed files
with
88 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
lib/internal/v8_prof_polyfill.js | ||
lib/punycode.js | ||
test/addons/doc-*/ | ||
test/fixtures | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
'use strict'; | ||
var cp = require('child_process'); | ||
var fs = require('fs'); | ||
var path = require('path'); | ||
|
||
var scriptFiles = [ | ||
'internal/v8_prof_polyfill', | ||
'v8/tools/splaytree', | ||
'v8/tools/codemap', | ||
'v8/tools/csvparser', | ||
'v8/tools/consarray', | ||
'v8/tools/profile', | ||
'v8/tools/profile_view', | ||
'v8/tools/logreader', | ||
'v8/tools/tickprocessor', | ||
'v8/tools/SourceMap', | ||
'v8/tools/tickprocessor-driver' | ||
]; | ||
var tempScript = 'tick-processor-tmp-' + process.pid; | ||
var tempNm = 'mac-nm-' + process.pid; | ||
|
||
process.on('exit', function() { | ||
try { fs.unlinkSync(tempScript); } catch (e) {} | ||
try { fs.unlinkSync(tempNm); } catch (e) {} | ||
}); | ||
process.on('uncaughtException', function(err) { | ||
try { fs.unlinkSync(tempScript); } catch (e) {} | ||
try { fs.unlinkSync(tempNm); } catch (e) {} | ||
throw err; | ||
}); | ||
|
||
scriptFiles.forEach(function(script) { | ||
fs.appendFileSync(tempScript, process.binding('natives')[script]); | ||
}); | ||
var tickArguments = [tempScript]; | ||
if (process.platform === 'darwin') { | ||
fs.writeFileSync(tempNm, process.binding('natives')['v8/tools/mac-nm'], | ||
{ mode: 0o555 }); | ||
tickArguments.push('--mac', '--nm=' + path.join(process.cwd(), tempNm)); | ||
} else if (process.platform === 'win32') { | ||
tickArguments.push('--windows'); | ||
} | ||
tickArguments.push.apply(tickArguments, process.argv.slice(1)); | ||
cp.spawn(process.execPath, tickArguments, { stdio: 'inherit' }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,17 +94,13 @@ done | |
/usr/include/* | ||
/usr/lib/node_modules/ | ||
/usr/share/doc/node/gdbinit | ||
/usr/share/doc/node/tick-processor | ||
/usr/share/man/man1/node.1.gz | ||
/usr/share/systemtap/tapset/node.stp | ||
%{_datadir}/%{name}/ | ||
%doc CHANGELOG.md LICENSE README.md | ||
|
||
|
||
%changelog | ||
* Tue Sep 22 2015 Matt Loring <[email protected]> | ||
- Added tick processor. | ||
|
||
* Tue Jul 7 2015 Ali Ijaz Sheikh <[email protected]> | ||
- Added gdbinit. | ||
|
||
|
This file was deleted.
Oops, something went wrong.