summaryrefslogtreecommitdiff
path: root/src/vm/eventpipe.cpp
diff options
context:
space:
mode:
authorBrian Robbins <brianrob@microsoft.com>2017-05-10 15:11:28 -0700
committerGitHub <noreply@github.com>2017-05-10 15:11:28 -0700
commit377073385e4545d36e1a96429dd78548f87c597c (patch)
treef89141239ab55d650e7b516ea10a8514d5c81c44 /src/vm/eventpipe.cpp
parent0b625bfdbb97565b7d489d1d083cfaf4dbd47e0d (diff)
downloadcoreclr-377073385e4545d36e1a96429dd78548f87c597c.tar.gz
coreclr-377073385e4545d36e1a96429dd78548f87c597c.tar.bz2
coreclr-377073385e4545d36e1a96429dd78548f87c597c.zip
Re-Factor EventSource to Support Writing to EventPipe (#11435)
Re-Factor EventSource to Support Writing to EventPipe.
Diffstat (limited to 'src/vm/eventpipe.cpp')
-rw-r--r--src/vm/eventpipe.cpp69
1 files changed, 67 insertions, 2 deletions
diff --git a/src/vm/eventpipe.cpp b/src/vm/eventpipe.cpp
index 8ea3f0867e..bed4cfdbc4 100644
--- a/src/vm/eventpipe.cpp
+++ b/src/vm/eventpipe.cpp
@@ -184,8 +184,10 @@ void EventPipe::WriteEvent(EventPipeEvent &event, BYTE *pData, unsigned int leng
length);
// Write to the EventPipeFile.
- _ASSERTE(s_pFile != NULL);
- s_pFile->WriteEvent(instance);
+ if(s_pFile != NULL)
+ {
+ s_pFile->WriteEvent(instance);
+ }
// Write to the EventPipeJsonFile if it exists.
if(s_pJsonFile != NULL)
@@ -306,4 +308,67 @@ CrstStatic* EventPipe::GetLock()
return &s_configCrst;
}
+INT_PTR QCALLTYPE EventPipeInternal::CreateProvider(
+ GUID providerID,
+ EventPipeCallback pCallbackFunc)
+{
+ QCALL_CONTRACT;
+
+ EventPipeProvider *pProvider = NULL;
+
+ BEGIN_QCALL;
+
+ pProvider = new EventPipeProvider(providerID, pCallbackFunc, NULL);
+
+ END_QCALL;
+
+ return reinterpret_cast<INT_PTR>(pProvider);
+}
+
+INT_PTR QCALLTYPE EventPipeInternal::AddEvent(
+ INT_PTR provHandle,
+ __int64 keywords,
+ unsigned int eventID,
+ unsigned int eventVersion,
+ unsigned int level,
+ bool needStack)
+{
+ QCALL_CONTRACT;
+ BEGIN_QCALL;
+
+ // TODO
+
+ END_QCALL;
+
+ return 0;
+}
+
+void QCALLTYPE EventPipeInternal::DeleteProvider(
+ INT_PTR provHandle)
+{
+ QCALL_CONTRACT;
+ BEGIN_QCALL;
+
+ if(provHandle != NULL)
+ {
+ EventPipeProvider *pProvider = reinterpret_cast<EventPipeProvider*>(provHandle);
+ delete pProvider;
+ }
+
+ END_QCALL;
+}
+
+void QCALLTYPE EventPipeInternal::WriteEvent(
+ INT_PTR eventHandle,
+ void *pData,
+ unsigned int length)
+{
+ QCALL_CONTRACT;
+ BEGIN_QCALL;
+
+ // TODO
+
+ END_QCALL;
+}
+
#endif // FEATURE_PERFTRACING