Add --profiler=PROFILER option to run-perf-tests to allow specifying which profiler...
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Dec 2012 06:41:24 +0000 (06:41 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Dec 2012 06:41:24 +0000 (06:41 +0000)
commit17ed9da4f442d823438e4b28748690eff35d1dec
tree60c08f5d2217aab0da721290a57b82d51306609e
parentec3968c33dc79808808e5b9010a40b3773563137
Add --profiler=PROFILER option to run-perf-tests to allow specifying which profiler to use on platforms with many
https://bugs.webkit.org/show_bug.cgi?id=104891

Reviewed by Ryosuke Niwa.

I also implemented a very simple "Sample" Profiler using
Mac OS X's /usr/bin/sample command line tool.

The real reason for this abstraction is to make it easy
to support both perf and pprof on linux which seem to
be about equally popular among those I ask in the Chrome team.

* Scripts/webkitpy/common/system/profiler.py:
(ProfilerFactory.create_profiler):
(ProfilerFactory):
(ProfilerFactory.available_profilers_by_name):
(ProfilerFactory.default_profiler_name):
(Sample):
(Sample.__init__):
(Sample.attach_to_pid):
(Sample.profile_after_exit):
(IProfiler.attach_to_pid):
* Scripts/webkitpy/layout_tests/port/driver.py:
(Driver.__init__):
* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner._parse_args):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@137714 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/Scripts/webkitpy/common/system/profiler.py
Tools/Scripts/webkitpy/common/system/profiler_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/driver.py
Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py