projects
/
platform
/
upstream
/
dotnet
/
runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b3134b
)
make GC/GCHandle tracing pay-for-play (dotnet/coreclr#21479)
author
Sung Yoon Whang
<suwhang@microsoft.com>
Tue, 11 Dec 2018 06:49:18 +0000
(22:49 -0800)
committer
GitHub
<noreply@github.com>
Tue, 11 Dec 2018 06:49:18 +0000
(22:49 -0800)
Commit migrated from https://github.com/dotnet/coreclr/commit/
b25304c757219d3103f691f615b5fa70ed22e92e
src/coreclr/src/gc/gceventstatus.h
patch
|
blob
|
history
diff --git
a/src/coreclr/src/gc/gceventstatus.h
b/src/coreclr/src/gc/gceventstatus.h
index
5482fb5
..
c49e767
100644
(file)
--- a/
src/coreclr/src/gc/gceventstatus.h
+++ b/
src/coreclr/src/gc/gceventstatus.h
@@
-241,9
+241,12
@@
void FireDynamicEvent(const char* name, EventArgument... arguments)
template<typename... EventActualArgument> \
inline void GCEventFire##name(EventActualArgument... arguments) \
{ \
- IGCToCLREventSink* sink = GCToEEInterface::EventSink(); \
- assert(sink != nullptr); \
- sink->Fire##name(arguments...); \
+ if (GCEventEnabled##name()) \
+ { \
+ IGCToCLREventSink* sink = GCToEEInterface::EventSink(); \
+ assert(sink != nullptr); \
+ sink->Fire##name(arguments...); \
+ } \
}
#define DYNAMIC_EVENT(name, level, keyword, ...) \