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

Issue 23819018: Fix data races caused by compiler stats counters in the parser. (Closed)

Created:
7 years, 3 months ago by Florian Schneider
Modified:
5 years, 7 months ago
Reviewers:
srdjan, hausner
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Fix data races caused by compiler stats counters in the parser. BUG=https://code.google.com/p/dart/issues/detail?id=13025

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -6 lines) Patch
M runtime/vm/parser.h View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/parser.cc View 3 chunks +11 lines, -5 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Florian Schneider
Instead of hiding them behind the flag, we could also remove those counters, if there ...
7 years, 3 months ago (2013-09-04 14:48:26 UTC) #1
hausner
I will discuss with Ivan today, but I'd prefer to leave the code unchanged. We ...
7 years, 3 months ago (2013-09-04 15:31:38 UTC) #2
srdjan
DBC The parser tracer change makes sense to me (we increment the indent only with ...
7 years, 3 months ago (2013-09-04 16:42:54 UTC) #3
Ivan Posva
On 2013/09/04 16:42:54, srdjan wrote: > DBC > > The parser tracer change makes sense ...
7 years, 3 months ago (2013-09-04 16:56:28 UTC) #4
Florian Schneider
On 2013/09/04 15:31:38, hausner wrote: > I will discuss with Ivan today, but I'd prefer ...
7 years, 3 months ago (2013-09-05 09:37:18 UTC) #5
srdjan
On 2013/09/05 09:37:18, Florian Schneider wrote: > On 2013/09/04 15:31:38, hausner wrote: > > I ...
7 years, 2 months ago (2013-09-26 14:29:17 UTC) #6
Florian Schneider
7 years, 2 months ago (2013-10-01 08:53:07 UTC) #7
On 2013/09/26 14:29:17, srdjan wrote:
> On 2013/09/05 09:37:18, Florian Schneider wrote:
> > On 2013/09/04 15:31:38, hausner wrote:
> > > I will discuss with Ivan today, but I'd prefer to leave the code
unchanged.
> We
> > > may still want the counter, but we certainly don't want to pay the price
of
> an
> > > additional flag check. Not only does this slow down the compiler in every
> > case,
> > > it also doesn't resolve the race issue.
> > >
> > 
> > I'm much in favor of removing the code using #ifdef.
> > But how much does a "if (FLAG_xy) { z++ }" slow down the compiler?
> > It is measureable at all? Inside the if-statemnt we use atomic increments to
> > avoid the race.
> > We certainly don't care for the extra cost when running with
--compiler-stats.
> > When disabled, it is load + branch vs. load + store. It's not clear which is
> > faster.
> > 
> > > I think we can live with the race conditions here. On the other hand, if a
> > > little kitten gets killed each time a counter is wrong, we can hide the
> > > instrumentation in preprocessor macros that only add the counters in
special
> > > builds.
> 
> Status on this?

Not sure. I still think the data races should be fixed (at least when running
without --compiler-stats).

I did not notice any performance degradation with my "fix".

Powered by Google App Engine
This is Rietveld 408576698