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

Issue 144423009: Trace event micro-optimization: use finer grained lock. (Closed)

Created:
6 years, 10 months ago by bulach
Modified:
6 years, 10 months ago
CC:
chromium-reviews, dsinclair+watch_chromium.org, erikwright+watch_chromium.org
Visibility:
Public.

Description

Trace event micro-optimization: use finer grained lock. GetCategoryGroupEnabledInternal is a hotspot. It traverses an append-only list, so it's safe to use a finer-grained lock, and avoid it altogether for the "fast path", i.e., when the category is already known. BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=251178

Patch Set 1 #

Patch Set 2 : comments #

Patch Set 3 : off by one #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -27 lines) Patch
M base/debug/trace_event_impl.cc View 1 2 2 chunks +39 lines, -27 lines 1 comment Download

Messages

Total messages: 23 (0 generated)
bulach
ptal
6 years, 10 months ago (2014-02-05 02:24:09 UTC) #1
dsinclair
+wangxianzhu who has done a lot of work with the various tracing locks.
6 years, 10 months ago (2014-02-05 02:34:41 UTC) #2
Xianzhu
Can we avoid the lock by making g_category_index an AtomicWord?
6 years, 10 months ago (2014-02-05 17:37:01 UTC) #3
Xianzhu
There seems a problem: when two threads are getting the enabled flag of the same ...
6 years, 10 months ago (2014-02-05 17:45:01 UTC) #4
bulach
good points! I'll change to an atomic word, and how about this: - have an ...
6 years, 10 months ago (2014-02-05 18:01:42 UTC) #5
Xianzhu
On 2014/02/05 18:01:42, bulach wrote: > good points! I'll change to an atomic word, and ...
6 years, 10 months ago (2014-02-05 18:17:49 UTC) #6
epennerAtGoogle
This looks really nice! The more we can remove locks, use thread-locals, and defer stuff ...
6 years, 10 months ago (2014-02-05 20:44:44 UTC) #7
epennerAtGoogle
On 2014/02/05 20:44:44, epennerAtGoogle wrote: > This looks really nice! > > The more we ...
6 years, 10 months ago (2014-02-05 20:47:21 UTC) #8
bulach
second try, ptal..
6 years, 10 months ago (2014-02-05 20:48:36 UTC) #9
bulach
On 2014/02/05 20:48:36, bulach wrote: > second try, ptal.. sorry, we crossed our streams... :) ...
6 years, 10 months ago (2014-02-05 20:54:52 UTC) #10
epennerAtGoogle
On 2014/02/05 20:47:21, epennerAtGoogle wrote: > On 2014/02/05 20:44:44, epennerAtGoogle wrote: > > This looks ...
6 years, 10 months ago (2014-02-05 20:55:04 UTC) #11
Xianzhu
On 2014/02/05 20:55:04, epennerAtGoogle wrote: > Actually, I understand this better now. We initialize the ...
6 years, 10 months ago (2014-02-05 21:29:25 UTC) #12
Xianzhu
lgtm. Thanks!
6 years, 10 months ago (2014-02-05 21:29:38 UTC) #13
bulach
On 2014/02/05 20:55:04, epennerAtGoogle wrote: > On 2014/02/05 20:47:21, epennerAtGoogle wrote: > > On 2014/02/05 ...
6 years, 10 months ago (2014-02-05 21:31:44 UTC) #14
epennerAtGoogle
> by once per trace-site you mean, once per trace invocation? > yes, I think ...
6 years, 10 months ago (2014-02-05 22:15:41 UTC) #15
bulach
nat / dsinclair, can I have your OWNERS review please?
6 years, 10 months ago (2014-02-11 12:36:01 UTC) #16
dsinclair
lgtm. Sorry for the delay.
6 years, 10 months ago (2014-02-11 14:33:08 UTC) #17
nduca
also lgtm
6 years, 10 months ago (2014-02-12 20:42:51 UTC) #18
bulach
hey folks, I had a stupid facepalm off by one error... bots are now happy.. ...
6 years, 10 months ago (2014-02-13 17:55:36 UTC) #19
dsinclair
The CQ bit was checked by dsinclair@chromium.org
6 years, 10 months ago (2014-02-13 19:14:11 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bulach@chromium.org/144423009/300001
6 years, 10 months ago (2014-02-13 19:17:52 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bulach@chromium.org/144423009/300001
6 years, 10 months ago (2014-02-13 20:02:24 UTC) #22
commit-bot: I haz the power
6 years, 10 months ago (2014-02-13 23:06:23 UTC) #23
Message was sent while issue was closed.
Change committed as 251178

Powered by Google App Engine
This is Rietveld 408576698