Commit Graph

30 Commits

Author SHA1 Message Date
yangguo@chromium.org
c5883d442e Add option to limit tick processor to a time range.
R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13541 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-29 14:41:02 +00:00
yangguo@chromium.org
028f85a244 Include more information in --prof log.
Main changes:
- include timestamps in profile ticks
- include code kind in code create events
- time execution in external code
- changed plot-timer-events.js to show the code kind being executed

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13074 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-28 11:01:10 +00:00
yangguo@chromium.org
fff8eba038 Fix test expectations for the tickprocessor.
Review URL: https://chromiumcodereview.appspot.com/9388003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10682 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-13 10:24:55 +00:00
mikhail.naganov@gmail.com
57b9e9d968 Revert accidental r9229 and r9230
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9231 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-12 10:50:40 +00:00
mikhail.naganov@gmail.com
03d325da08 add test
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9230 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-12 10:42:25 +00:00
mikhail.naganov@gmail.com
5c57d0d643 Remove support for logging into a memory buffer.
The only usage of it was in logging tests, I've switched them for
using a file.

I've left out support for "--logfile=*" for now, as Chromium uses it.
Will be removed after the next V8 roll.

R=sgjesse@chromium.org
BUG=859
TEST=mjsunit/log-*

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8629 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 11:31:22 +00:00
lrn@chromium.org
7aec228dbb Cleanup of mjsunit.js code and make assertEquals more strict.
Encapsulate the helper functions in mjsunit.js.
Now only exposes the exception class and the assertXXX functions.

Make assertEquals use === instead of ==.
This prevents a lot of possiblefalse positives in tests, and avoids
having to do assertTrue(expected === actual) when you need it.

Fixed some tests that were either buggy or assuming == test.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7628 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-15 11:35:36 +00:00
mikhail.naganov@gmail.com
cbbe713464 Change the way sampler / profiler handle external callbacks.
This should fix test-profile-generator/RecordStackTraceAtStartProfiling flakinness.

R=vitalyr@chromium.org
BUG=1261
TEST=test-profile-generator/RecordStackTraceAtStartProfiling

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7294 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-21 18:13:27 +00:00
mikhail.naganov@gmail.com
56788625b6 Fix CPU profiling for Crankshaft.
The main issue was due to multiple recompilations of functions.  Now
code objects are grouped by function using SFI object address.
JSFunction objects are no longer tracked, instead we track SFI object
moves. To pick a correct code version, we now sample return addresses
instead of JSFunction addresses.

tools/{linux|mac|windows}-tickprocessor scripts differentiate
between code optimization states for the same function
(using * and ~ prefixes introduced earlier).

DevTools CPU profiler treats all variants of function code as
a single function.

ll_prof treats each optimized variant as a separate entry, because
it can disassemble each one of them.

tickprocessor.py not updated -- it is deprecated and will be removed.

BUG=v8/1087,b/3178160
TEST=all existing tests pass, including Chromium layout tests

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6902 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-22 16:31:24 +00:00
mikhail.naganov@gmail.com
12e62e7154 Shorten constructor names in JS tickprocessor.
As they are no more used in DevTools profiler, there is no
need to prefix them with "devtools.profiler" namespace.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6712 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-10 07:47:28 +00:00
mikhail.naganov@gmail.com
670aea0218 Remove log compression support.
This is no longer used in Chromium, and only pollutes code.

BUG=859

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5934 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 13:24:22 +00:00
mikhail.naganov@gmail.com
5ebc1a68ef Fix tests after r3811.
TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3813 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-08 08:55:01 +00:00
mikhail.naganov@gmail.com
0867927b4b Rewrite CsvParser.parseLine to make it simpler and gain some performance improvement.
Review URL: http://codereview.chromium.org/548198

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3746 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-29 13:32:32 +00:00
mikhail.naganov@gmail.com
999e3fca90 Fix issue 553: function frame is skipped in profile when compare stub is called.
The problem appeared due to a fact that stubs doesn't create a stack
frame, reusing the stack frame of the caller function. When building
stack traces, the current function is retrieved from PC, and its
callees are retrieved by traversing the stack backwards. Thus, for
stubs, the stub itself was discovered via PC, and then stub's caller's
caller was retrieved from stack.

To fix this problem, a pointer to JSFunction object is now captured
from the topmost stack frame, and is saved into stack trace log
record. Then a simple heuristics is applied whether a referred
function should be added to decoded stack, or not, to avoid reporting
the same function twice (from PC and from the pointer.)

BUG=553
TEST=added to mjsunit/tools/tickprocessor

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-21 16:42:41 +00:00
mikhail.naganov@gmail.com
d87f83c5f8 Fix issue 427: JS tick processor now works out-of-the-box for Chromium on Windows.
MSVS names '.map' file using only module's name, so both 'a.exe' and 'a.dll' will have 'a.map' file. To distinguish an originating module, we're now checking for image base which is always 00400000 for .exe files, and not 00400000 for .dlls.

Verified that windows-tick-processor can now process logs from Chromium using .map file generated for 'chrome.dll', an that it still works for V8's 'shell.exe'.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2699 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-17 13:45:03 +00:00
mikhail.naganov@gmail.com
910b5ef31a Fix issue 420: accept truncated log files.
http://code.google.com/p/v8/issues/detail?id=420

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2695 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-17 09:31:58 +00:00
mikhail.naganov@gmail.com
e0b829b1a5 TickProcessor: more accurate mapping of statically compiled code on Linux.
'nm' is now called with an option to report function code sizes. Static code entries are restricted to the sizes reported, and the remaining unnamed code is attributed to a library as a whole. This makes reports more accurate, as some functions are tiny, but has chunks of unnamed code behind them.

This change doesn't affect reporting on Windows, as in .map files function code sizes aren't specified.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2455 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-14 09:47:44 +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
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
7d260e5f8c Don't keep data about JS code that is never executed.
This reduces memory usage of tickprocessor. Thanks to William Hesse for pointing out this issue.

Also speed up static symbols loading.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1902 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-08 11:27:02 +00:00
mikhail.naganov@gmail.com
178a656429 Enhancing profiling data processing code with functionality needed for the Dev Tools Profiler.
Details:

 - added properties / functions in view objects needed for WebKit's ProfileView;

 - added ability to count profiles for specific functions.

The tickprocessor functionality does not affected.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1823 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-30 08:10:27 +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
mikhail.naganov@gmail.com
2060dc1512 Added ProfileView object for performing sorting, searching and filtering operations on a profile.
It will be used both in the new tickprocessor and Dev Tools profiler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1786 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-24 11:37:38 +00:00
mikhail.naganov@gmail.com
6290e19716 Implemented a CSV parser in JavaScript.
Review URL: http://codereview.chromium.org/67253

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1740 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-17 17:58:14 +00:00
mikhail.naganov@gmail.com
dfe8af02a6 Implemented Profile object that processes profiling events and calculates profiling data.
Review URL: http://codereview.chromium.org/77014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1739 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-17 17:40:52 +00:00
mikhail.naganov@gmail.com
5edf6f35bc Reimplement (address -> code) mapping from tickprocessor.py in JS.
Found a pair of bugs concerned with border cases in the original implementation.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1726 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-16 16:05:17 +00:00
mikhail.naganov@gmail.com
e9aa21849b Reimplement Splay Tree in JavaScript (and add unit tests!).
This is the first step in reimplementing tick processing scripts in
JavaScript. The goal is to have the same source both for Dev Tools and
Golem, so Python implementation will be removed to avoid code
duplication.

The implementation follows the Dev Tools style: namespaces and JSDocs
are used.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1709 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-15 01:22:52 +00:00