https://codereview.chromium.org/1327033003/diff/20001/tools/run_perf.py
File tools/run_perf.py (right):

https://codereview.chromium.org/1327033003/diff/20001/tools/run_perf.py#newcode651
tools/run_perf.py:651: if profiler_run:
On 2015/09/11 08:22:33, gdeepti1 wrote:
On 2015/09/10 07:49:44, Michael Achenbach wrote:
> Suggestion: Could you maybe just use the existing extra_flags list?
I.e. make
> '--prof' a flag that triggers the additional logic below. The
condition here
> could be rewritten as:
> if '--prof' in self.extra_flags:
>   ...
>
> The tool could be started with:
> run_perf --extra-flags="--prof --other-flag1 ..."
>
> The check for the d8 executable above in line 459 could be made in a
similar
> way, e.g.:
> extra_flags = extra_flags or []
> if self.binary != 'd8' and '--prof' in self.extra_flags:
>   # Warn about wrong usage.

Currently passing in the --profiler flag to run_perf alters the
original output
by printing additional summary from the tick_processor. Output below:

>>> Running suite: Embenchen/Box2d
>>> Stdout (#1):
EmbenchenBox2d(RunTime): 11392 ms.

Statistical profiling result from v8.log, (10723 ticks, 0 unaccounted,
0
excluded).

  [Summary]:
    ticks  total  nonlib   name
   10153   94.7%   94.9%  JavaScript
     549    5.1%    5.1%  C++
      40    0.4%    0.4%  GC
      21    0.2%          Shared libraries

My initial approach was to pass in the --prof as a part of extra
flags, but as
it was modifying the output in a way passing the --prof flag to d8
does not do I
was not sure if it was the right approach. Just to confirm - it is ok
to
overload the --prof flag to run and print the output of the tick
processor as
well?

Hmm - not sure if I understand. I don't wanna imply any code changes in
v8/d8. Everything there should remain as it is. You should also keep the
code below that does the printing (i.e. line 663). I would just not
guard it by an extra flag "if profiler_run", but by deducing the same
thing from the extra_flags, i.e. "if '--prof' in self.extra_flags".

I.e. when you run "d8 --prof" it does not run the tick-processor, but if
you test d8 through run_perf.py with --extra-flags="--prof", it will run
with --prof _and_ the run_perf script will call the tick processor and
print.

https://codereview.chromium.org/1327033003/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to