Skip to content

Commit 78360d9

Browse files
committed
Addressing code review feedbacks
1 parent 7cc30ea commit 78360d9

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/vm/eventpipebuffer.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,11 @@ class EventPipeBuffer
146146
// Input of NULL gets the first event.
147147
EventPipeEventInstance* GetNext(EventPipeEventInstance *pEvent, LARGE_INTEGER beforeTimeStamp);
148148

149-
// Get the next event from the buffer, but don't mark it read.
149+
// Get the next event from the buffer
150150
EventPipeEventInstance* PeekNext(LARGE_INTEGER beforeTimeStamp);
151151

152-
// TODO
152+
// Advance the buffer to the next event
153+
// pEvent is expected to be the last event returned from PeekNext()
153154
void PopNext(EventPipeEventInstance *pEvent);
154155

155156
// Check the state of the buffer

src/vm/eventpipebuffermanager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ void EventPipeBufferManager::SuspendWriteEvent()
647647

648648
_ASSERTE(EnsureConsistency());
649649

650-
// All calls to this method must not be synchronized by our caller
650+
// All calls to this method must be synchronized by our caller
651651
_ASSERTE(EventPipe::IsLockOwnedByCurrentThread());
652652

653653
CQuickArrayList<EventPipeThread*> threadList;

src/vm/eventpipebuffermanager.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class EventPipeBufferManager
129129

130130
// From the time this function returns until ResumeWriteEvent() is called a suspended state will
131131
// be in effect that blocks all WriteEvent activity. All existing buffers will be in the
132-
// PENDING_FLUSH state and no new EventPipeBuffers or EventPipeBufferLists can be created. Calls to
132+
// READ_ONLY state and no new EventPipeBuffers or EventPipeBufferLists can be created. Calls to
133133
// WriteEvent that start during the suspension period or were in progress but hadn't yet recorded
134134
// their event into a buffer before the start of the suspension period will return false and the
135135
// event will not be recorded. Any events that not recorded as a result of this suspension will be
@@ -197,7 +197,8 @@ class EventPipeBufferList
197197
// Get the count of buffers in the list.
198198
unsigned int GetCount() const;
199199

200-
// TODO
200+
// Pop the event from the buffer, and potentially clean-up the previous buffer
201+
// pNext is expected to be the last event returned from TryGetBuffer()->PeekNext()
201202
void PopNextEvent(EventPipeBuffer *pContainingBuffer, EventPipeEventInstance *pNext);
202203

203204
// Get the thread associated with this list.

0 commit comments

Comments
 (0)