Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Statistics gathering in compiler should be (can be) thread safe #9613

Closed
scabug opened this issue Jan 7, 2016 · 6 comments
Closed

Statistics gathering in compiler should be (can be) thread safe #9613

scabug opened this issue Jan 7, 2016 · 6 comments

Comments

@scabug
Copy link

scabug commented Jan 7, 2016

In cases where compiler is used in some sort of parallel compilation (e.g. sbt) statistics (if enabled) are gathered in single place. Regardless of statistics being tempered (e.g. thread A and B wants to push/pop timer: A.push B.push, A.pop B.pop and we end in B -> A for A and A ~~> B for B ~~ instead of tow medium times we got one long and one short time) it can also fails (e.g. match error on popTimer).

@scabug
Copy link
Author

scabug commented Jan 7, 2016

Imported From: https://issues.scala-lang.org/browse/SI-9613?orig=1
Reporter: @romanowski

@scabug scabug added this to the Backlog milestone Apr 7, 2017
@SethTisue
Copy link
Member

has anything happened with this in recent work on statistics? (@jvican?)

@lrytz
Copy link
Member

lrytz commented Feb 19, 2018

scala/scala#6326

@jvican
Copy link
Member

jvican commented Feb 19, 2018

@SethTisue Nothing happened in this area because the use of statistics within the compiler didn't require thread safety. Now, with the introduction of the parallel genbcode, the use case has changed, so I'm happy to see progress on this area in the ticket that Lukas has linked to.

@romanowski
Copy link

@jvican what about gathering stats from IDE/sbt based compilations that run multiple compilations in parallel? IIRC the problem was that stats was stored in static maps that was shared across all compilations.

@jvican
Copy link
Member

jvican commented Feb 19, 2018

That was fixed in 2.12.4.

@lrytz lrytz modified the milestones: Backlog, 2.12.5 Mar 8, 2018
@lrytz lrytz closed this as completed Mar 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants