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

Issue 21101002: Support higher CPU profiler sampling rate on posix systems (Closed)

Created:
7 years, 4 months ago by yurys
Modified:
7 years, 4 months ago
CC:
v8-dev, alph
Visibility:
Public.

Description

Support higher CPU profiler sampling rate on posix systems New flag is added that allows to specify CPU profiler sampling rate in microseconds as command line argument. It was tested to work fine with 100us interval(currently it is 1ms). Default values are kept the same as in the current implementation. The new implementation is enabled only on POSIX platforms which use signals to collect samples. Other platforms that pause thread being sampled are to follow. SIGPROF signals are now sent on the profiler event processor thread to make sure that the processing thread does fall far behind the sampling. The patch is based on the previous one that was rolled out in r13851. The main difference is that the circular queue is not modified for now. On Linux sampling for CPU profiler is initiated on the profiler event processor thread, other platforms to follow. CPU profiler continues to use SamplingCircularQueue, we will probably replace it with a single sample buffer when Mac and Win ports support profiling on the event processing thread. When --prof option is specified profiling is initiated either on the profiler event processor thread if CPU profiler is on or on the SignalSender thread as it used to be if no CPU profiles are being collected. ProfilerEventsProcessor::ProcessEventsAndDoSample now waits in a tight loop, processing collected samples until sampling interval expires. To save CPU resources I'm planning to change that to use nanosleep as only one sample is expected in the queue at any point. BUG=v8:2814 R=bmeurer@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=16310

Patch Set 1 #

Total comments: 2

Patch Set 2 : Rebaseline #

Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -23 lines) Patch
M src/cpu-profiler.h View 1 2 chunks +9 lines, -1 line 0 comments Download
M src/cpu-profiler.cc View 1 5 chunks +48 lines, -12 lines 0 comments Download
M src/flag-definitions.h View 1 1 chunk +12 lines, -0 lines 0 comments Download
M src/sampler.h View 2 chunks +14 lines, -2 lines 0 comments Download
M src/sampler.cc View 1 5 chunks +28 lines, -4 lines 0 comments Download
M test/cctest/test-cpu-profiler.cc View 1 4 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
yurys
7 years, 4 months ago (2013-07-29 17:12:20 UTC) #1
yurys
7 years, 4 months ago (2013-07-29 18:59:28 UTC) #2
Benedikt Meurer
https://codereview.chromium.org/21101002/diff/1/src/cpu-profiler.cc File src/cpu-profiler.cc (right): https://codereview.chromium.org/21101002/diff/1/src/cpu-profiler.cc#newcode175 src/cpu-profiler.cc:175: ProcessEventsAndYield(); I think there are two severe issues with ...
7 years, 4 months ago (2013-07-30 06:41:04 UTC) #3
yurys
https://codereview.chromium.org/21101002/diff/1/src/cpu-profiler.cc File src/cpu-profiler.cc (right): https://codereview.chromium.org/21101002/diff/1/src/cpu-profiler.cc#newcode175 src/cpu-profiler.cc:175: ProcessEventsAndYield(); On 2013/07/30 06:41:04, Benedikt Meurer wrote: > I ...
7 years, 4 months ago (2013-07-30 08:52:25 UTC) #4
Benedikt Meurer
On 2013/07/30 08:52:25, Yury Semikhatsky wrote: > https://codereview.chromium.org/21101002/diff/1/src/cpu-profiler.cc > File src/cpu-profiler.cc (right): > > https://codereview.chromium.org/21101002/diff/1/src/cpu-profiler.cc#newcode175 ...
7 years, 4 months ago (2013-07-30 09:58:31 UTC) #5
yurys
On 2013/07/30 09:58:31, Benedikt Meurer wrote: > On 2013/07/30 08:52:25, Yury Semikhatsky wrote: > > ...
7 years, 4 months ago (2013-07-30 12:33:28 UTC) #6
yurys
7 years, 4 months ago (2013-08-26 07:17:24 UTC) #7
Message was sent while issue was closed.
Committed patchset #2 manually as r16310.

Powered by Google App Engine
This is Rietveld 408576698