run-perf-tests --profile should use iprofiler instead of instruments on Mac
https://bugs.webkit.org/show_bug.cgi?id=103765

Reviewed by Ryosuke Niwa.

Stephanie pointed out that iprofiler is the newer command-line interface
to replace /usr/bin/instruments in Instruments 4 (which according to the
interblags is supported on everything since 10.6.6), so I've moved --profile
to use iprofiler on Mac.

I also made the IProfiler class wait for iprofiler to complete so that
iprofiler won't continue running after run-perf-tests is complete (and
spam over the top of your shell output).

There are a couple of "got-chas" to this approach:
1.  iprofiler will ask for your password the first time you run it, which may
    cause your first test to fail.  /usr/bin/instruments doesn't seem to do that.
2.  iprofiler has nice (but kinda awkward for our purposes) support for separate
    directory and basename arguments, making IProfiler a somewhat awkward
    baseclass of SingleFileOutputProfiler

I suspect we'll iterate from here.  It does seem slightly faster than
/usr/bin/instruments was.

* Scripts/webkitpy/common/system/profiler.py:
(ProfilerFactory.create_profiler):
(IProfiler):
(IProfiler.__init__):
(IProfiler.attach_to_pid):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2 files changed