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

Issue 12321046: Send SIGPROF signals on the profiler event processor thread (Closed)

Created:
7 years, 10 months ago by yurys
Modified:
7 years, 9 months ago
CC:
chromium-reviews
Base URL:
git://github.com/v8/v8.git@master
Visibility:
Public.

Description

Send SIGPROF signals on the profiler event processor thread The patch is based on the previous one that was rolled out: https://code.google.com/p/v8/source/detail?r=12985 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 replave 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 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:2364 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=13735

Patch Set 1 #

Patch Set 2 : Added method stubs on non-linux platforms #

Total comments: 2

Patch Set 3 : Changed int distance parameter to boolean #

Total comments: 2

Patch Set 4 : Fixed typo: Profler->Profiler #

Unified diffs Side-by-side diffs Delta from patch set Stats (+322 lines, -69 lines) Patch
M src/circular-queue.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M src/circular-queue.cc View 1 2 2 chunks +12 lines, -8 lines 0 comments Download
M src/cpu-profiler.h View 2 chunks +8 lines, -1 line 0 comments Download
M src/cpu-profiler.cc View 1 2 3 5 chunks +45 lines, -11 lines 0 comments Download
M src/flag-definitions.h View 1 chunk +4 lines, -0 lines 0 comments Download
M src/platform.h View 1 2 3 3 chunks +25 lines, -4 lines 0 comments Download
M src/platform-cygwin.cc View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download
M src/platform-freebsd.cc View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download
M src/platform-linux.cc View 1 2 3 10 chunks +98 lines, -39 lines 0 comments Download
M src/platform-macos.cc View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download
M src/platform-nullos.cc View 1 2 3 1 chunk +21 lines, -0 lines 0 comments Download
M src/platform-openbsd.cc View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download
M src/platform-solaris.cc View 1 2 3 1 chunk +18 lines, -0 lines 0 comments Download
M src/platform-win32.cc View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download
M test/cctest/test-cpu-profiler.cc View 4 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
yurys
7 years, 10 months ago (2013-02-21 12:10:33 UTC) #1
yurys
7 years, 10 months ago (2013-02-21 12:12:32 UTC) #2
loislo
https://codereview.chromium.org/12321046/diff/2001/src/circular-queue.cc File src/circular-queue.cc (right): https://codereview.chromium.org/12321046/diff/2001/src/circular-queue.cc#newcode39 src/circular-queue.cc:39: int producer_consumer_distance) I'd pass a boolean or enum flag ...
7 years, 10 months ago (2013-02-21 12:42:39 UTC) #3
yurys
https://codereview.chromium.org/12321046/diff/2001/src/circular-queue.cc File src/circular-queue.cc (right): https://codereview.chromium.org/12321046/diff/2001/src/circular-queue.cc#newcode39 src/circular-queue.cc:39: int producer_consumer_distance) On 2013/02/21 12:42:39, loislo wrote: > I'd ...
7 years, 10 months ago (2013-02-21 12:45:48 UTC) #4
Jakob Kummerow
LGTM with a nit. https://codereview.chromium.org/12321046/diff/5002/src/platform.h File src/platform.h (right): https://codereview.chromium.org/12321046/diff/5002/src/platform.h#newcode797 src/platform.h:797: static bool CanSampleOnProflerEventsProcessorThread(); s/Profler/Profiler/
7 years, 10 months ago (2013-02-21 13:32:17 UTC) #5
yurys
https://codereview.chromium.org/12321046/diff/5002/src/platform.h File src/platform.h (right): https://codereview.chromium.org/12321046/diff/5002/src/platform.h#newcode797 src/platform.h:797: static bool CanSampleOnProflerEventsProcessorThread(); On 2013/02/21 13:32:17, Jakob wrote: > ...
7 years, 10 months ago (2013-02-21 13:45:40 UTC) #6
yurys
7 years, 9 months ago (2013-02-26 16:15:47 UTC) #7
Message was sent while issue was closed.
Committed patchset #4 manually as r13735 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698