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

Issue 8313013: Support JSON encoding of data for about:tracking information (Closed)

Created:
9 years, 2 months ago by jar (doing other things)
Modified:
9 years, 1 month ago
CC:
chromium-reviews, brettw-cc_chromium.org
Visibility:
Public.

Description

Support JSON encoding of data for about:tracking information I also fought a terrible (but educational) fight with Thread Local Store, and its ability to do cleanup (call destructors) at thread exit (notably applicable to Worker Threads). Thta is why there were soooo many test bot runs and tiny checkins. I now have a plan in mind that won't rely on that functionality. The code seems to work cross-platform, but if I have trouble with Linux, I'll repeatedly leak ThreadData contexts temporarily on that platform. Given that the code is only enabled under Debug, this is not yet a real problem. Each CL I write for this code also includes a bunch of cleanup. In this case, I changed the Write() methods to WriteHTML(), since I didn't want any confusion with JSON writing etc. I also did a bunch of tiny cleanups which should not have changed what the code does. r=rtenneti Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=106952

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Patch Set 11 : '' #

Patch Set 12 : '' #

Patch Set 13 : '' #

Patch Set 14 : '' #

Patch Set 15 : '' #

Patch Set 16 : '' #

Patch Set 17 : '' #

Patch Set 18 : '' #

Patch Set 19 : '' #

Patch Set 20 : '' #

Patch Set 21 : '' #

Patch Set 22 : '' #

Patch Set 23 : '' #

Patch Set 24 : '' #

Patch Set 25 : '' #

Patch Set 26 : '' #

Patch Set 27 : '' #

Patch Set 28 : '' #

Total comments: 20

Patch Set 29 : '' #

Patch Set 30 : '' #

Total comments: 12
Unified diffs Side-by-side diffs Delta from patch set Stats (+678 lines, -199 lines) Patch
M base/location.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +9 lines, -0 lines 0 comments Download
M base/location.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +12 lines, -0 lines 0 comments Download
M base/message_loop.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 chunk +2 lines, -1 line 0 comments Download
M base/threading/worker_pool_posix.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +2 lines, -1 line 0 comments Download
M base/threading/worker_pool_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +2 lines, -1 line 0 comments Download
M base/tracked_objects.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 18 chunks +103 lines, -72 lines 8 comments Download
M base/tracked_objects.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 21 chunks +232 lines, -118 lines 0 comments Download
M base/tracked_objects_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 5 chunks +316 lines, -6 lines 4 comments Download

Messages

Total messages: 5 (0 generated)
jar (doing other things)
Eric and/or Raman, I'm pretty sure in addition to providing the ToValue() code (the external ...
9 years, 2 months ago (2011-10-24 03:40:17 UTC) #1
ramant (doing other things)
LGTM. small nits. http://codereview.chromium.org/8313013/diff/27025/base/location.cc File base/location.cc (right): http://codereview.chromium.org/8313013/diff/27025/base/location.cc#newcode76 base/location.cc:76: dictionary->Set("file_name", base::Value::CreateStringValue(file_name_ )); nit: extra space ...
9 years, 2 months ago (2011-10-24 18:03:48 UTC) #2
jar (doing other things)
Changes in response to Rtenneti's review. All the try bots are passing (or at least ...
9 years, 2 months ago (2011-10-24 18:43:27 UTC) #3
eroman
A couple style nits (didn't review this in detail, consider Raman to be your main ...
9 years, 2 months ago (2011-10-24 22:23:03 UTC) #4
jar (doing other things)
9 years, 1 month ago (2011-10-27 06:23:34 UTC) #5
Comments in response to Eroman.

I landed this CL before reading your suggestions, so I have put all your
suggestions into the next CL (which will arrive later today or tomorrow??).  

Jim

http://codereview.chromium.org/8313013/diff/32005/base/tracked_objects.h
File base/tracked_objects.h (right):

http://codereview.chromium.org/8313013/diff/32005/base/tracked_objects.h#newc...
base/tracked_objects.h:253: // Constructe a DictionaryValue instance containing
all our stats. The caller
On 2011/10/24 22:23:04, eroman wrote:
> typo: construct

Done.

http://codereview.chromium.org/8313013/diff/32005/base/tracked_objects.h#newc...
base/tracked_objects.h:342: // Generate a ListValue representation of the vector
of snapshots.  The caller
On 2011/10/24 22:23:04, eroman wrote:
> nit: style guide says to use passive tense for function comments, as in
> "Generates".

Done.

http://codereview.chromium.org/8313013/diff/32005/base/tracked_objects.h#newc...
base/tracked_objects.h:518: // Constructe a ListValue instance containing all
recursive results in our
On 2011/10/24 22:23:04, eroman wrote:
> typo construct.

Done.

http://codereview.chromium.org/8313013/diff/32005/base/tracked_objects.h#newc...
base/tracked_objects.h:522: static base::Value* ToValue(int process_type);
On 2011/10/24 22:23:04, eroman wrote:
> not sure about this process_type parameter.

Rephrased as a TODO task.

http://codereview.chromium.org/8313013/diff/32005/base/tracked_objects_unitte...
File base/tracked_objects_unittest.cc (right):

http://codereview.chromium.org/8313013/diff/32005/base/tracked_objects_unitte...
base/tracked_objects_unittest.cc:18: ~TrackedObjectsTest() {
On 2011/10/24 22:23:04, eroman wrote:
> nit: indentation

Done.

http://codereview.chromium.org/8313013/diff/32005/base/tracked_objects_unitte...
base/tracked_objects_unittest.cc:173: "\"birth_thread\":\"WorkerThread-1\","
It is possible (within a single process) to have two threads named idenically. 
Currently, the named threads all have unique thread-names, and I manually name
the WorkerThreads with unique names.

When we go cross-process (and get multiple renders, in addition to the browser),
I'm sure we'll have dups... but I think we'd have dups based on ThreadId as
well.

Bottom line: I don't this this is a problem at this point.

On 2011/10/24 22:23:04, eroman wrote:
> Are thread names guaranteed to be unique? I wander if we should track the
thread
> by ID, and then have an auxiliary mapping from ID --> Name.

Powered by Google App Engine
This is Rietveld 408576698