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

Issue 171115: Linux profiler: check whether signal handler is called in the VM thread. (Closed)

Created:
11 years, 3 months ago by Mikhail Naganov
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Linux profiler: check whether signal handler is called in the VM thread. I have several Chromium's core files having SIGPROF signal handler called in the context of an arbitrary thread, causing a crash. This change introduces checking of current thread in the signal handler. Committed: http://code.google.com/p/v8/source/detail?r=2825

Patch Set 1 #

Patch Set 2 : Handling the case of multiple VM threads #

Total comments: 4

Patch Set 3 : Now dealing with multiple threads correctly, added test. #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+208 lines, -8 lines) Patch
M src/platform-linux.cc View 1 2 6 chunks +32 lines, -1 line 0 comments Download
M src/v8threads.h View 3 chunks +3 lines, -1 line 0 comments Download
M src/v8threads.cc View 4 chunks +14 lines, -4 lines 4 comments Download
M test/cctest/test-log.cc View 1 2 4 chunks +159 lines, -2 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Mikhail Naganov
11 years, 3 months ago (2009-09-02 10:14:18 UTC) #1
Dean McNamee
Why is it called on another thread?
11 years, 3 months ago (2009-09-02 10:32:44 UTC) #2
Søren Thygesen Gjesse
From what I can see this will only work when V8 is only ever used ...
11 years, 3 months ago (2009-09-02 11:22:53 UTC) #3
Mikhail Naganov
I've implemented a check for the case of multiple VM threads.
11 years, 3 months ago (2009-09-03 11:51:19 UTC) #4
Mads Ager (chromium)
http://codereview.chromium.org/171115/diff/3001/4001 File src/platform-linux.cc (right): http://codereview.chromium.org/171115/diff/3001/4001#newcode619 Line 619: // it means that the VM thread is ...
11 years, 3 months ago (2009-09-03 12:08:53 UTC) #5
Mikhail Naganov
OK, I learned the implementation of threading in V8 and updated my code. I also ...
11 years, 3 months ago (2009-09-04 08:44:19 UTC) #6
Mads Ager (chromium)
LGTM
11 years, 3 months ago (2009-09-04 09:00:00 UTC) #7
Søren Thygesen Gjesse
LGTM http://codereview.chromium.org/171115/diff/6001/7002 File src/v8threads.cc (right): http://codereview.chromium.org/171115/diff/6001/7002#newcode244 Line 244: int ThreadManager::last_id_ = 0; Please add a ...
11 years, 3 months ago (2009-09-04 09:29:57 UTC) #8
Mikhail Naganov
11 years, 3 months ago (2009-09-04 11:09:22 UTC) #9
Thanks!

http://codereview.chromium.org/171115/diff/6001/7002
File src/v8threads.cc (right):

http://codereview.chromium.org/171115/diff/6001/7002#newcode244
Line 244: int ThreadManager::last_id_ = 0;
On 2009/09/04 09:29:57, Søren Gjesse wrote:
> Please add a comment about that a thread cannot have id 0.

Done.

http://codereview.chromium.org/171115/diff/6001/7002#newcode331
Line 331: int thread_id = ++last_id_;
On 2009/09/04 09:29:57, Søren Gjesse wrote:
> Maybe assert thread_id > 0.

Done.

Powered by Google App Engine
This is Rietveld 408576698