Skip to content

Commit

Permalink
[profiler] Update a stale comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Rønne Petersen committed Oct 4, 2016
1 parent a5f75c0 commit 00754f9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions mono/profiler/mono-profiler-log.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,10 +558,12 @@ init_time (void)
}

/*
* These macros create a scope to avoid leaking the buffer returned
* from ensure_logbuf () as it may have been invalidated by a GC
* thread during STW. If you called init_thread () with add_to_lls =
* FALSE, then don't use these macros.
* These macros should be used when writing an event to a log buffer. They take
* care of a bunch of stuff that can be repetitive and error-prone, such as
* acquiring/releasing the buffer lock, incrementing the event counter,
* expanding the log buffer, processing requests, etc. They also create a scope
* so that it's harder to leak the LogBuffer pointer, which can be problematic
* as the pointer is unstable when the buffer lock isn't acquired.
*/

#define ENTER_LOG(COUNTER, BUFFER, SIZE) \
Expand Down

0 comments on commit 00754f9

Please sign in to comment.