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

Issue 404022: Hold histograms in static variables instead of allocating heap. (Closed)

Created:
11 years, 1 month ago by ukai
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Hold histograms in static variables instead of allocating heap. If instance variables holding pointers to Histograms, it would cause crash bug when the instance is torn down and the metrics services use and recording of their contents. The current "standard" patten for using Histograms includes making sure that the Histogram instances are not destroyed prematurely, held in static variables. BUG=28096 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=32311

Patch Set 1 #

Total comments: 2

Patch Set 2 : fix compile failure #

Patch Set 3 : no ## needed #

Total comments: 5

Patch Set 4 : const kTimeBucketCount #

Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -112 lines) Patch
M chrome/browser/net/websocket_experiment/websocket_experiment_runner.h View 2 chunks +0 lines, -14 lines 0 comments Download
M chrome/browser/net/websocket_experiment/websocket_experiment_runner.cc View 1 2 3 5 chunks +94 lines, -98 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
ukai
11 years, 1 month ago (2009-11-18 05:11:33 UTC) #1
Yuzo
Linux bot reports a compilation error: websocket_experiment_runner.cc:280:1: error: pasting ""WebSocketExperiment.Basic."" and ""LastState"" does not give ...
11 years, 1 month ago (2009-11-18 05:39:56 UTC) #2
Yuzo
Linux bot reports a compilation error: websocket_experiment_runner.cc:280:1: error: pasting ""WebSocketExperiment.Basic."" and ""LastState"" does not give ...
11 years, 1 month ago (2009-11-18 05:40:12 UTC) #3
tyoshino (SeeGerritForStatus)
http://codereview.chromium.org/404022/diff/1/2 File chrome/browser/net/websocket_experiment/websocket_experiment_runner.cc (right): http://codereview.chromium.org/404022/diff/1/2#newcode284 Line 284: UPDATE_HISTOGRAM(kWebSocketConnectName, task_result.last_state, kLastStateName
11 years, 1 month ago (2009-11-18 05:44:36 UTC) #4
ukai
On 2009/11/18 05:39:56, Yuzo wrote: > Linux bot reports a compilation error: > > websocket_experiment_runner.cc:280:1: ...
11 years, 1 month ago (2009-11-18 05:50:19 UTC) #5
ukai
http://codereview.chromium.org/404022/diff/1/2 File chrome/browser/net/websocket_experiment/websocket_experiment_runner.cc (right): http://codereview.chromium.org/404022/diff/1/2#newcode284 Line 284: UPDATE_HISTOGRAM(kWebSocketConnectName, task_result.last_state, On 2009/11/18 05:44:36, tyoshino wrote: > ...
11 years, 1 month ago (2009-11-18 05:50:44 UTC) #6
Yuzo
http://codereview.chromium.org/404022/diff/5001/5002 File chrome/browser/net/websocket_experiment/websocket_experiment_runner.cc (right): http://codereview.chromium.org/404022/diff/5001/5002#newcode28 Line 28: // TODO(ukai): Use new thread-safe-reference-counted Histograms. So this ...
11 years, 1 month ago (2009-11-18 06:00:03 UTC) #7
ukai
http://codereview.chromium.org/404022/diff/5001/5002 File chrome/browser/net/websocket_experiment/websocket_experiment_runner.cc (right): http://codereview.chromium.org/404022/diff/5001/5002#newcode28 Line 28: // TODO(ukai): Use new thread-safe-reference-counted Histograms. On 2009/11/18 ...
11 years, 1 month ago (2009-11-18 06:13:07 UTC) #8
tyoshino (SeeGerritForStatus)
LGTM
11 years, 1 month ago (2009-11-18 06:16:47 UTC) #9
Yuzo
LGTM http://codereview.chromium.org/404022/diff/5001/5002 File chrome/browser/net/websocket_experiment/websocket_experiment_runner.cc (right): http://codereview.chromium.org/404022/diff/5001/5002#newcode28 Line 28: // TODO(ukai): Use new thread-safe-reference-counted Histograms. On ...
11 years, 1 month ago (2009-11-18 06:19:18 UTC) #10
jar (doing other things)
The transition to combat the destruction problem looks fine. One question: Will these data-recording functions ...
11 years, 1 month ago (2009-11-18 06:58:13 UTC) #11
ukai
On 2009/11/18 06:58:13, jar wrote: > The transition to combat the destruction problem looks fine. ...
11 years, 1 month ago (2009-11-18 07:36:43 UTC) #12
jar (doing other things)
11 years, 1 month ago (2009-11-18 09:11:09 UTC) #13
LGTM (assuming as you noted that you're on the IO thread during all data
recording).

Powered by Google App Engine
This is Rietveld 408576698