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

Issue 7039020: Tag all tracked objects, including Tasks, with the program counter at the site of FROM_HERE. (Closed)

Created:
9 years, 7 months ago by apatrick_chromium
Modified:
9 years, 7 months ago
CC:
chromium-reviews, Raghu Simha, ncarter (slow), idana, tim (not reviewing), brettw-cc_chromium.org
Visibility:
Public.

Description

Tag all tracked objects, including Tasks, with the program counter at the site of FROM_HERE. This is to make it easier to determine the site Tasks are posted from in release builds, especially when only a minidump is available. It should help diagnose http://crbug.com/81499. I added a debug function to alias variables so that the optimizer will not strip them out if they are not live. The semantics of the MessageLoop::PostTask functions is changed and it is wrong but I am not sure what semantics are intended. It seems location information was no longer being tracked for Tasks wrapped as Closures and I don't know if this was intended. PTAL. Update: this has since been fixed. TEST=Set breakpoint in TaskClosureAdapter::Run and very that the post site can be located in an optimized build. BUG=81499 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=85991

Patch Set 1 #

Total comments: 12

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 2

Patch Set 4 : '' #

Total comments: 1

Patch Set 5 : '' #

Total comments: 2

Patch Set 6 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+116 lines, -16 lines) Patch
M base/base.gypi View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
A base/debug/alias.h View 1 2 3 4 1 chunk +20 lines, -0 lines 0 comments Download
A base/debug/alias.cc View 1 2 3 4 1 chunk +20 lines, -0 lines 0 comments Download
M base/message_loop.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M base/message_loop.cc View 1 2 3 4 3 chunks +11 lines, -1 line 0 comments Download
M base/tracked.h View 1 2 3 4 5 5 chunks +22 lines, -5 lines 0 comments Download
M base/tracked.cc View 1 2 3 4 5 5 chunks +34 lines, -8 lines 0 comments Download
M chrome/browser/sync/glue/data_type_manager.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/sync/profile_sync_service.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 27 (0 generated)
apatrick_chromium
http://codereview.chromium.org/7039020/diff/1/base/message_loop.cc File base/message_loop.cc (left): http://codereview.chromium.org/7039020/diff/1/base/message_loop.cc#oldcode770 base/message_loop.cc:770: #if defined(TRACK_ALL_TASK_OBJECTS) Removing this is wrong but what it ...
9 years, 7 months ago (2011-05-17 22:48:04 UTC) #1
darin (slow to review)
what a cool idea!! jar should review this too.
9 years, 7 months ago (2011-05-17 22:56:11 UTC) #2
awong
http://codereview.chromium.org/7039020/diff/1/base/message_loop.cc File base/message_loop.cc (left): http://codereview.chromium.org/7039020/diff/1/base/message_loop.cc#oldcode770 base/message_loop.cc:770: #if defined(TRACK_ALL_TASK_OBJECTS) On 2011/05/17 22:48:04, apatrick_chromium wrote: > Removing ...
9 years, 7 months ago (2011-05-17 23:54:01 UTC) #3
awong
http://codereview.chromium.org/7039020/diff/1/base/message_loop.cc File base/message_loop.cc (left): http://codereview.chromium.org/7039020/diff/1/base/message_loop.cc#oldcode770 base/message_loop.cc:770: #if defined(TRACK_ALL_TASK_OBJECTS) On 2011/05/17 23:54:01, awong wrote: > On ...
9 years, 7 months ago (2011-05-17 23:54:55 UTC) #4
cpu_(ooo_6.6-7.5)
I think something like this will be of great help for the set of developers ...
9 years, 7 months ago (2011-05-18 00:52:25 UTC) #5
awong
http://codereview.chromium.org/7039020/diff/1/base/tracked.h File base/tracked.h (right): http://codereview.chromium.org/7039020/diff/1/base/tracked.h#newcode81 base/tracked.h:81: void* program_counter_; I don't think that const really matters ...
9 years, 7 months ago (2011-05-18 01:02:45 UTC) #6
jar (doing other things)
It is an interesting effort. I think it may be very helpful. It is also ...
9 years, 7 months ago (2011-05-18 01:32:33 UTC) #7
jar (doing other things)
On 2011/05/18 01:02:45, awong wrote: > > The difference is that __FUNCTION__, __FILE__, and __LINE__ ...
9 years, 7 months ago (2011-05-18 01:51:55 UTC) #8
jar (doing other things)
I'm not sure... but I just tried to use about:tasks in a today's TOT build, ...
9 years, 7 months ago (2011-05-18 02:47:28 UTC) #9
darin (slow to review)
Though the full functionality of task tracking may have regressed recently, I think Al is ...
9 years, 7 months ago (2011-05-18 04:07:25 UTC) #10
awong
I think I found the problem with tracked objects. See description of this CL for ...
9 years, 7 months ago (2011-05-18 20:19:22 UTC) #11
awong
Random preemptive kibitz... Just noticed the new patchsets. It occurs to me that all we're ...
9 years, 7 months ago (2011-05-18 20:37:15 UTC) #12
apatrick_chromium
On 2011/05/18 20:37:15, awong wrote: > Random preemptive kibitz... > > Just noticed the new ...
9 years, 7 months ago (2011-05-18 20:49:28 UTC) #13
eroman%chromium.org
http://codereview.chromium.org/7039020/diff/11002/base/message_loop.cc File base/message_loop.cc (right): http://codereview.chromium.org/7039020/diff/11002/base/message_loop.cc#newcode477 base/message_loop.cc:477: base::debug::Alias(&program_counter); Since you are only targeting MSVC anyway, how ...
9 years, 7 months ago (2011-05-18 20:52:44 UTC) #14
awong
On 2011/05/18 20:49:28, apatrick_chromium wrote: > On 2011/05/18 20:37:15, awong wrote: > > Random preemptive ...
9 years, 7 months ago (2011-05-18 21:01:18 UTC) #15
apatrick_chromium
Ready for another review. http://codereview.chromium.org/7039020/diff/1/base/message_loop.cc File base/message_loop.cc (left): http://codereview.chromium.org/7039020/diff/1/base/message_loop.cc#oldcode770 base/message_loop.cc:770: #if defined(TRACK_ALL_TASK_OBJECTS) On 2011/05/18 01:32:34, ...
9 years, 7 months ago (2011-05-18 21:09:47 UTC) #16
awong
LGTM w/one nit. http://codereview.chromium.org/7039020/diff/10004/base/tracked.h File base/tracked.h (right): http://codereview.chromium.org/7039020/diff/10004/base/tracked.h#newcode69 base/tracked.h:69: const void* program_counter() const { return ...
9 years, 7 months ago (2011-05-18 21:29:09 UTC) #17
apatrick_chromium
On 2011/05/18 21:29:09, awong wrote: > LGTM w/one nit. > > http://codereview.chromium.org/7039020/diff/10004/base/tracked.h > File base/tracked.h ...
9 years, 7 months ago (2011-05-19 00:35:13 UTC) #18
Daniel Berlin
> Okay I will fix that. > > Does anyone object to me committing this? ...
9 years, 7 months ago (2011-05-19 18:40:45 UTC) #19
apatrick_chromium
On 2011/05/19 18:40:45, Daniel Berlin wrote: > > Okay I will fix that. > > ...
9 years, 7 months ago (2011-05-19 19:17:06 UTC) #20
jar (doing other things)
If the global is never used (read), won't the compiler optimize away all assignments to ...
9 years, 7 months ago (2011-05-19 19:21:34 UTC) #21
jar (doing other things)
The hassle with "global variable" is that we don't get heap dumps, but only stack ...
9 years, 7 months ago (2011-05-19 19:28:13 UTC) #22
Daniel Berlin
Only in whole program mode. Even then, in order to prove that the global is ...
9 years, 7 months ago (2011-05-19 19:29:32 UTC) #23
Daniel Berlin
On Thu, May 19, 2011 at 3:28 PM, Daniel Berlin <dannyb@google.com> wrote: > Only in ...
9 years, 7 months ago (2011-05-19 19:38:45 UTC) #24
Daniel Berlin
On Thu, May 19, 2011 at 3:18 PM, Jim Roskind <jar@chromium.org> wrote: > The hassle ...
9 years, 7 months ago (2011-05-19 19:41:40 UTC) #25
darin (slow to review)
LGTM http://codereview.chromium.org/7039020/diff/19003/base/tracked.h File base/tracked.h (right): http://codereview.chromium.org/7039020/diff/19003/base/tracked.h#newcode84 base/tracked.h:84: BASE_API const void* GetProgramCounterRegister(); nit: maybe just call ...
9 years, 7 months ago (2011-05-19 21:00:03 UTC) #26
apatrick_chromium
9 years, 7 months ago (2011-05-19 21:09:44 UTC) #27
http://codereview.chromium.org/7039020/diff/19003/base/tracked.h
File base/tracked.h (right):

http://codereview.chromium.org/7039020/diff/19003/base/tracked.h#newcode84
base/tracked.h:84: BASE_API const void* GetProgramCounterRegister();
On 2011/05/19 21:00:03, darin wrote:
> nit: maybe just call this GetProgramCounter()... Register suffix doesn't add
> much and you are storing the result as "program_counter"

Done.

Powered by Google App Engine
This is Rietveld 408576698