Commit Graph

21 Commits

Author SHA1 Message Date
Camillo Bruni
a8eea87933 [tools] Port more tools to ES6 classes
Convert Profile, CodeMap and their helpers to ES6 classes.
Code cleanup will happen in a separate step.

Bug: v8:10667
Change-Id: Icfb28f6d9ef7f00efba93b347fdf210a9af36a49
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2509591
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70969}
2020-11-04 14:45:41 +00:00
Camillo Bruni
94bce1dcac [tools] Convert JS-tools to ES6 modules
This changes all tools to use ES6 modules and proper imports.

Step 1: Add converted .mjs files (*this CL*)
Step 2: Update node-ci build to use new .mjs files
Step 3: Remove outdated .js files

Bug: v8:10667, v8:10933
Change-Id: I3e92e66f896d8a9cacaf6d421f8d2c86fb3bc444
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2431045
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70163}
2020-09-28 14:40:18 +00:00
Michael Starzinger
706042680c [tools] Make tick processor report error to stderr.
R=herhut@chromium.org

Change-Id: Iaac8c2e036a0343c4d4a5c50bc91fb3d35e5d760
Reviewed-on: https://chromium-review.googlesource.com/c/1319586
Reviewed-by: Stephan Herhut <herhut@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57282}
2018-11-06 14:25:55 +00:00
Yang Guo
4659544389 tick processor: fix arguments and comments
Node.js uses the tick processor as well, but wraps the script
differently so that `this.arguments` does not work.

Also fixed outdated comments.

R=petermarshall@chromium.org

Change-Id: Ia902962b302ec4aa02d31a6ac31ac20510ddcca7
Reviewed-on: https://chromium-review.googlesource.com/c/1304353
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57061}
2018-10-29 09:48:23 +00:00
Camillo Bruni
eff39bbb70 [tools] Move common arguments processing into separate file
Change-Id: Ia7b30b3f9d19ac1a6da978a0bd884e8f6f38841b
Reviewed-on: https://chromium-review.googlesource.com/730570
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48850}
2017-10-24 00:25:04 +00:00
Mircea Trofin
ae5de6184e [d8] enable os.system only when requested
os.system uses fork(), which is not supported by ASAN/LSAN. Some fuzz tests
consist of js code that randomly picks properties and functions and calls them.
Sometimes, this combination means ASAN will report false positives.

Bug: chromium:740361
Change-Id: Id8d517263251a1fe88abadd33b0225c664b00498
Reviewed-on: https://chromium-review.googlesource.com/580313
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46876}
2017-07-25 14:42:44 +00:00
jkummerow@chromium.org
43bf8f9754 Add source map support to tick processor.
Added a console parameter for source map to the tick processor.
The tickprocesspor reads in the source maps and uses it to output the original filename, line number and column in the profile.
Modified d8 to output column numbers into the log, since this is needed to do source mapping.

R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/22897021

Patch from Daniel Kurka <dankurka@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16307 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-23 17:20:54 +00:00
mikhail.naganov@gmail.com
1e5cf45e3a Fix path to d8 and properly quote strings so it works with dash(1)
Patch by Sandro Santilli <strk@keybit.net>

Review URL: https://chromiumcodereview.appspot.com/10825032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12200 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-26 10:03:30 +00:00
yangguo@chromium.org
f69c0b04bb Adapt linux-tick-processor to GYP build.
Review URL: http://codereview.chromium.org/8038019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9429 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 14:09:30 +00:00
mikhail.naganov@gmail.com
792a6652ad Don't try to build d8 from profiler tick processor scripts.
As described in the issue 1532, this may lead to building a 32-bit version over
existing x64-bit. It's better delegate to delegate this task to an user.

R=vitalyr@chromium.org
BUG=1532

Review URL: http://codereview.chromium.org/7309012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8530 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-05 05:27:10 +00:00
erik.corry@gmail.com
6c6a998e4e * Fix build errors on FreeBSD 8.2
* Fix Crankshaft on FreeBSD.
* Partially fix profiling on FreeBSD.
* Remove bash-isms from tick processor script.
Review URL: http://codereview.chromium.org/6673045

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7200 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-16 11:15:43 +00:00
mikhail.naganov@gmail.com
f332ab9615 Profiler tick processor: exploit d8's readline to avoid reading
entire file prior to parsing it. This allows processing of huge
log files (over 200 MB.)

Review URL: http://codereview.chromium.org/574015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3811 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-08 08:15:18 +00:00
mikhail.naganov@gmail.com
32b0e47fa5 Add automatic tests for Tick Processor, take two.
Now tests can be run from any directory. Location of test data is now determined using test file location provided by 'testcfg.py' script.

Tested under Linux, Mac, and Windows.

Review URL: http://codereview.chromium.org/155161


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 06:39:38 +00:00
kasperl@chromium.org
0684291c89 Revert r2372 to get the tree green again.
TBR=mikhail.naganov@gmail.com
Review URL: http://codereview.chromium.org/155137

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2377 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 13:06:40 +00:00
mikhail.naganov@gmail.com
0f7b263bdd Add automatic tests for Tick Processor.
Added tests for cmdline args parsing, symbols processing, and the whole process.

Tick Processor code was refactored to make it testable.

Review URL: http://codereview.chromium.org/149195


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2373 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 12:11:12 +00:00
mikhail.naganov@gmail.com
1e18e55c15 Two requested changes to tick processor.
1. If D8_PATH isn't specified, first try to locate 'd8' shell in path,
   and if not found, fallback to the one in tools_path/..
2. Add '--nm=<nm_exec>' parameter to specify 'nm' executable to use.

Review URL: http://codereview.chromium.org/132021


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2225 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-20 12:54:02 +00:00
mikhail.naganov@gmail.com
a1a962f65e Implemented processing of compressed log files.
- fixed address delta calculation;
- code creations are also compressed to be in sync with other events;
- factored out a base class from TickProcessor to reuse code in DevTools profiler.

Review URL: http://codereview.chromium.org/125256


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2216 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-18 07:59:13 +00:00
mikhail.naganov@gmail.com
18b4d8bfa7 Add an ability to explicitly specify path to d8 shell to linux-tick-processor.
Review URL: http://codereview.chromium.org/118306


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2113 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-05 15:49:37 +00:00
mikhail.naganov@gmail.com
f04016b19d In linux-tick-processor only compile d8 if it doesn't exist.
Review URL: http://codereview.chromium.org/113581


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2010 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-20 09:37:36 +00:00
mikhail.naganov@gmail.com
bffdfa3552 Rename profileview.js -> profile_view.js because WebInspector already has ProfileView.js.
Review URL: http://codereview.chromium.org/100102

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1805 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-28 09:15:31 +00:00
mikhail.naganov@gmail.com
aa2c33126c TickProcessor script reimplemented in JavaScript.
This is an effort to reuse profiler data processing code both in
TickProcessor and Dev Tools Profiler. The old Python implementation
will be removed.

The new TickProcessor works almost identical to the previous one.
However, it has some differences:

1. Not very useful "Call profile" section is replaced with a new
   WebKit-like "Bottom up (heavy) profile" which shows the most
   expensive functions together with their callers. I used it
   personally in order to find and remove bottlenecks in the
   tickprocessor script itself, and found it quite helpful.

2. Code entries with duplicate names (they occur for RegExes, stubs
   and sometimes for anonymous Function objects) are now distinguished
   by adding an occurence number inside curly brackets.

3. (Address -> code entry) mapping is more precise in boundary cases.

4. Windows version no more requires specifying .map file location.

5. Works faster.

Review URL: http://codereview.chromium.org/99054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1802 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-27 13:50:42 +00:00