Closed
Bug 554860
Opened 14 years ago
Closed 14 years ago
Sampler::takeSample should be volatile
Categories
(Tamarin Graveyard :: Virtual Machine, defect, P3)
Tamarin Graveyard
Virtual Machine
Tracking
(Not tracked)
RESOLVED
FIXED
Q3 11 - Serrano
People
(Reporter: mike, Assigned: mike)
Details
Attachments
(1 file)
2.73 KB,
patch
|
treilly
:
review+
edwsmith
:
superreview+
|
Details | Diff | Splinter Review |
In Sampler.h, "int32_t takeSample" should be "volatile int32_t takeSample", because that variable is set from one thread and accessed from another thread. A compiler might optimize away the reads, thus causing the profiler not to take samples as often as it should. It's an easy change, but in practice, this is highly unlikely because of the calling pattern, so I'm fine with deferring this until flash10.2.
Assignee: nobody → mmoreart
Flags: flashplayer-qrb+
Priority: -- → P3
Target Milestone: --- → flash10.2
Assignee | ||
Comment 1•14 years ago
|
||
Attachment #443674 -
Flags: superreview?(edwsmith)
Attachment #443674 -
Flags: review?(treilly)
Assignee | ||
Updated•14 years ago
|
Status: NEW → ASSIGNED
Comment 2•14 years ago
|
||
Is it necessary to transmit the volatile keyword up to the OSDep API? (unrelated: is OSDep pretty much obsolete now with VMPI?)
Assignee | ||
Comment 3•14 years ago
|
||
(In reply to comment #2) > Is it necessary to transmit the volatile keyword up to the OSDep API? I was wondering that too. I don't really feel that it is necessary to transmit it; but I tried leaving the OSDep API unchanged, and then I got a compiler warning on the line of Sampler.cpp that calls OSDep::startIntWriterTimer() -- the compiler didn't like the fact that I was passing a (volatile int *) to a function that is expecting an (int *). Obviously that would be easy to fix with a cast, but in general casts are somewhat undesirable. I really don't have a strong opinion about it -- I'd be fine with putting in a cast if others think that's a better approach.
Comment 4•14 years ago
|
||
i dont have a strong opinion either, just odd.
Comment 5•14 years ago
|
||
Comment on attachment 443674 [details] [diff] [review] patch On second thought I think volatile is correct at the interface; the contract is that a background thread will write to *addr.
Attachment #443674 -
Flags: superreview?(edwsmith) → superreview+
Updated•14 years ago
|
Attachment #443674 -
Flags: review?(treilly) → review+
Assignee | ||
Comment 6•14 years ago
|
||
Pushed: http://hg.mozilla.org/tamarin-redux/rev/5d9d0b0e8be8
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
Flags: flashplayer-bug+
You need to log in
before you can comment on or make changes to this bug.
Description
•