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

Issue 6780035: Use lock-free lazy initialization for static histogram references (Closed)

Created:
9 years, 8 months ago by jar (doing other things)
Modified:
9 years, 7 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, Erik does not do reviews, brettw-cc_chromium.org, jam, Randy Smith (Not in Mondays), Aaron Boodman, darin-cc_chromium.org, Paweł Hajdan Jr., pam+watch_chromium.org, Mike Belshe
Visibility:
Public.

Description

Use lock-free lazy initialization for static histogram references Make all histogram macros thread safe, and fast by again using statics to achieve performance. ...at the cost of: Leak all histograms to avoid races at shutdown. Also included leak suppression for valgrind. r=rtenneti BUG=78207 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=80412

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Total comments: 13

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Patch Set 11 : '' #

Total comments: 2

Patch Set 12 : '' #

Patch Set 13 : '' #

Patch Set 14 : '' #

Patch Set 15 : '' #

Patch Set 16 : '' #

Patch Set 17 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+379 lines, -329 lines) Patch
M base/message_loop.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M base/message_loop.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +4 lines, -3 lines 0 comments Download
M base/metrics/histogram.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 18 chunks +91 lines, -64 lines 0 comments Download
M base/metrics/histogram.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 12 chunks +70 lines, -65 lines 0 comments Download
M base/metrics/histogram_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 13 chunks +65 lines, -50 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/autocomplete/history_quick_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/boot_times_loader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/cros/cros_library_loader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/external_metrics.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/extensions/extension_metrics_apitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_metrics_module.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/jankometer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +8 lines, -8 lines 0 comments Download
M chrome/browser/metrics/thread_watcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/metrics/thread_watcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/net/url_info.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +5 lines, -4 lines 0 comments Download
M chrome/browser/net/websocket_experiment/websocket_experiment_task.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +0 lines, -11 lines 0 comments Download
M chrome/browser/sessions/session_restore.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/renderer/render_thread.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -6 lines 0 comments Download
M chrome/renderer/renderer_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/buffered_resource_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +13 lines, -10 lines 0 comments Download
M net/base/connection_type_histograms.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +3 lines, -8 lines 0 comments Download
M net/base/cookie_monster.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +11 lines, -11 lines 0 comments Download
M net/base/cookie_monster_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M net/base/mime_sniffer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 10 chunks +38 lines, -29 lines 0 comments Download
M net/disk_cache/histogram_macros.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +5 lines, -3 lines 0 comments Download
M net/disk_cache/stats.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M net/disk_cache/stats.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +3 lines, -3 lines 0 comments Download
M net/disk_cache/stats_histogram.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -3 lines 0 comments Download
M net/disk_cache/stats_histogram.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +11 lines, -14 lines 0 comments Download
M net/socket/client_socket_pool_histograms.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +4 lines, -4 lines 0 comments Download
M net/socket_stream/socket_stream_metrics_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +4 lines, -4 lines 0 comments Download
M tools/valgrind/memcheck/suppressions.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +14 lines, -0 lines 0 comments Download
M webkit/glue/webkitclient_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +4 lines, -6 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
jar (doing other things)
Note that the "leak" is not an ongoing leak, and hence would use the same ...
9 years, 8 months ago (2011-04-01 18:08:18 UTC) #1
rvargas (doing something else)
Please use the valgrind bots (try --bot=xx_valgrind) http://codereview.chromium.org/6780035/diff/10071/base/metrics/histogram.h File base/metrics/histogram.h (right): http://codereview.chromium.org/6780035/diff/10071/base/metrics/histogram.h#newcode38 base/metrics/histogram.h:38: // pointer ...
9 years, 8 months ago (2011-04-01 19:20:52 UTC) #2
ramant (doing other things)
Hi Jim, Most of my suggestions are nit. Changes LGTM. thanks, raman http://codereview.chromium.org/6780035/diff/10071/base/metrics/histogram.h File base/metrics/histogram.h ...
9 years, 8 months ago (2011-04-01 20:05:38 UTC) #3
ramant (doing other things)
Missed one more nit: http://codereview.chromium.org/6780035/diff/10071/chrome/browser/jankometer.cc File chrome/browser/jankometer.cc (right): http://codereview.chromium.org/6780035/diff/10071/chrome/browser/jankometer.cc#newcode145 chrome/browser/jankometer.cc:145: ; Extra semicolon?
9 years, 8 months ago (2011-04-01 20:07:26 UTC) #4
jar (doing other things)
Changes and responses to comments by ramant and rvargas http://codereview.chromium.org/6780035/diff/10071/base/metrics/histogram.h File base/metrics/histogram.h (right): http://codereview.chromium.org/6780035/diff/10071/base/metrics/histogram.h#newcode38 base/metrics/histogram.h:38: ...
9 years, 8 months ago (2011-04-01 21:50:27 UTC) #5
jar (doing other things)
This version includes all required valgrind suppressions. Valgrind runs fine on linux, mac, and chromeos ...
9 years, 8 months ago (2011-04-02 07:25:41 UTC) #6
willchan no longer on Chromium
http://codereview.chromium.org/6780035/diff/10071/base/metrics/histogram.h File base/metrics/histogram.h (right): http://codereview.chromium.org/6780035/diff/10071/base/metrics/histogram.h#newcode38 base/metrics/histogram.h:38: // pointer is NOT deleted, and we leak the ...
9 years, 8 months ago (2011-04-02 07:43:31 UTC) #7
rvargas (doing something else)
LGTM
9 years, 8 months ago (2011-04-04 19:16:07 UTC) #8
rvargas (doing something else)
http://codereview.chromium.org/6780035/diff/24012/tools/valgrind/memcheck/suppressions.txt File tools/valgrind/memcheck/suppressions.txt (right): http://codereview.chromium.org/6780035/diff/24012/tools/valgrind/memcheck/suppressions.txt#newcode4123 tools/valgrind/memcheck/suppressions.txt:4123: fun:_ZN14RunnableMethodI15DownloadManagerMS0_FvP18DownloadCreateInfoE6Tuple1vIS2_EE3RunEv ?
9 years, 8 months ago (2011-04-04 19:24:54 UTC) #9
jar (doing other things)
Corrected suppressions.txt http://codereview.chromium.org/6780035/diff/24012/tools/valgrind/memcheck/suppressions.txt File tools/valgrind/memcheck/suppressions.txt (right): http://codereview.chromium.org/6780035/diff/24012/tools/valgrind/memcheck/suppressions.txt#newcode4123 tools/valgrind/memcheck/suppressions.txt:4123: fun:_ZN14RunnableMethodI15DownloadManagerMS0_FvP18DownloadCreateInfoE6Tuple1vIS2_EE3RunEv On 2011/04/04 19:24:55, rvargas wrote: > ...
9 years, 8 months ago (2011-04-04 22:13:09 UTC) #10
commit-bot: I haz the power
Presubmit check for 6780035-24023 failed and returned exit status 1. Running presubmit commit checks ...
9 years, 8 months ago (2011-04-04 22:14:38 UTC) #11
Avi (use Gerrit)
Owner rubber-stamp LGTM.
9 years, 8 months ago (2011-04-04 22:19:33 UTC) #12
jar (doing other things)
I'd be curious to see how you'd craft the macro. Would it use a templatized ...
9 years, 8 months ago (2011-04-04 22:30:09 UTC) #13
commit-bot: I haz the power
9 years, 8 months ago (2011-04-04 23:10:40 UTC) #14

Powered by Google App Engine
This is Rietveld 408576698