Bug 1369644 - Remove use of |volatile| from ProfileEntry. r=mstange,shu,jseward,froydnj.

These annotations aren't doing anything useful. The important thing with
the PseudoStack is that, during pushes, the stack pointer incrementing happens
after the new entry is written, and this is ensured by the stack pointer being
Atomic.

The patch also improves the comments on PseudoStack.
This commit is contained in:
Nicholas Nethercote
2017-06-02 17:16:56 +10:00
parent 8e74fe8507
commit a47be2a53a
6 changed files with 64 additions and 64 deletions

View File

@@ -405,7 +405,7 @@ GetPathAfterComponent(const char* filename, const char (&component)[LEN]) {
} // namespace
const char*
ThreadStackHelper::AppendJSEntry(const volatile js::ProfileEntry* aEntry,
ThreadStackHelper::AppendJSEntry(const js::ProfileEntry* aEntry,
intptr_t& aAvailableBufferSize,
const char* aPrevLabel)
{
@@ -492,8 +492,8 @@ ThreadStackHelper::FillStackBuffer()
intptr_t availableBufferSize = intptr_t(reservedBufferSize);
// Go from front to back
const volatile js::ProfileEntry* entry = mPseudoStack->entries;
const volatile js::ProfileEntry* end = entry + mPseudoStack->stackSize();
const js::ProfileEntry* entry = mPseudoStack->entries;
const js::ProfileEntry* end = entry + mPseudoStack->stackSize();
// Deduplicate identical, consecutive frames
const char* prevLabel = nullptr;
for (; reservedSize-- && entry != end; entry++) {