Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Issue 149195: Add automatic tests for Tick Processor. (Closed)

Created:
11 years, 5 months ago by Mikhail Naganov
Modified:
9 years, 7 months ago
Reviewers:
Erik Corry
CC:
v8-dev
Visibility:
Public.

Description

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. Committed: http://code.google.com/p/v8/source/detail?r=2373

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+602 lines, -62 lines) Patch
A test/mjsunit/tools/tickprocessor.js View 1 chunk +258 lines, -0 lines 2 comments Download
A test/mjsunit/tools/tickprocessor-test.default View 1 chunk +60 lines, -0 lines 0 comments Download
A test/mjsunit/tools/tickprocessor-test.gc-state View 1 chunk +21 lines, -0 lines 0 comments Download
A test/mjsunit/tools/tickprocessor-test.ignore-unknown View 1 chunk +56 lines, -0 lines 0 comments Download
A test/mjsunit/tools/tickprocessor-test.log View 1 chunk +24 lines, -0 lines 0 comments Download
A test/mjsunit/tools/tickprocessor-test.separate-ic View 1 chunk +66 lines, -0 lines 0 comments Download
M tools/linux-tick-processor View 1 chunk +2 lines, -1 line 0 comments Download
M tools/tickprocessor.js View 2 chunks +65 lines, -60 lines 4 comments Download
A tools/tickprocessor-driver.js View 1 chunk +49 lines, -0 lines 0 comments Download
M tools/windows-tick-processor.bat View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
Mikhail Naganov
Hi Erik, As Soeren is on vacation, can you please do a review?
11 years, 5 months ago (2009-07-06 11:58:25 UTC) #1
Erik Corry
LGTM http://codereview.chromium.org/149195/diff/1/7 File test/mjsunit/tools/tickprocessor.js (right): http://codereview.chromium.org/149195/diff/1/7#newcode29 Line 29: // Files: tools/splaytree.js tools/codemap.js tools/csvparser.js tools/consarray.js tools/profile.js ...
11 years, 5 months ago (2009-07-07 11:15:32 UTC) #2
Mikhail Naganov
11 years, 5 months ago (2009-07-07 12:08:10 UTC) #3
Thanks, Erik!

http://codereview.chromium.org/149195/diff/1/7
File test/mjsunit/tools/tickprocessor.js (right):

http://codereview.chromium.org/149195/diff/1/7#newcode29
Line 29: // Files: tools/splaytree.js tools/codemap.js tools/csvparser.js
tools/consarray.js tools/profile.js tools/profile_view.js tools/logreader.js
tools/tickprocessor.js
On 2009/07/07 11:15:32, Erik Corry wrote:
> Over-long line.

This is an instruction to testcfg.py script to load these files. To fix this,
I've modified the script to search for several lines of files.

http://codereview.chromium.org/149195/diff/1/10
File tools/tickprocessor.js (right):

http://codereview.chromium.org/149195/diff/1/10#newcode520
Line 520: 'Show only ticks from JS VM state'],
On 2009/07/07 11:15:32, Erik Corry wrote:
> It would be better if this was an object with keys instead of an array.  Then
> you could use dispatch.key, dispatch.default and dispatch.helpText instead of
> dispatch[0], dispatch[1] etc. below.  You can defer this change to another
> changelist if you like.

The downside of using a map here is that the definition will become too wordy:
several lines containing repetitive 'key', 'default', etc. Array is just
briefer. Since this is internal data, I would prefer to leave it as is.

http://codereview.chromium.org/149195/diff/1/10#newcode596
Line 596: s = s + (new Array(len - s.length + 1).join(' '));
On 2009/07/07 11:15:32, Erik Corry wrote:
> I hope this part isn't performance critical in any way!  Couldn't you just
keep
> a long string of spaces around and use substring to chop off as many as you
need
> to pad.

No, this is just for printing an usage message.

But I also have a twin of this: padLeft which is used for printing statistics.
I've changed it to use memoization, so previously generated paddings are reused.

Powered by Google App Engine
This is Rietveld 408576698