diff options
author | José Rivero <jorive@microsoft.com> | 2019-04-16 18:58:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-16 18:58:31 -0700 |
commit | b388f6cd87d87f4a07fe966aaa1bc92f245165d9 (patch) | |
tree | 96d38fd71242691b4066ffe8977993b827bdb77a /src/vm/eventpipeinternal.cpp | |
parent | f360bbc0cf893bcd612516563145729743d3af2b (diff) | |
download | coreclr-b388f6cd87d87f4a07fe966aaa1bc92f245165d9.tar.gz coreclr-b388f6cd87d87f4a07fe966aaa1bc92f245165d9.tar.bz2 coreclr-b388f6cd87d87f4a07fe966aaa1bc92f245165d9.zip |
[EventPipe] Minor bug fixes, and remove redundant/unused code. (#23956)
- Update MicrosoftDiagnosticsTracingTraceEventPackageVersion
- Delete connection if the request is unknown/unhandled
- Adding missing error handling.
- Provider names must be defined.
- Some renaming, error handling, and build warnings.
- Removing test code, and merge EventPipe::Enable functions.
- Remove commented/non-used lines.
Diffstat (limited to 'src/vm/eventpipeinternal.cpp')
-rw-r--r-- | src/vm/eventpipeinternal.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/vm/eventpipeinternal.cpp b/src/vm/eventpipeinternal.cpp index 17efeb39e6..9291d6b228 100644 --- a/src/vm/eventpipeinternal.cpp +++ b/src/vm/eventpipeinternal.cpp @@ -20,7 +20,7 @@ UINT64 QCALLTYPE EventPipeInternal::Enable( __in_z LPCWSTR outputFile, UINT32 circularBufferSizeInMB, - INT64 profilerSamplingRateInNanoseconds, + UINT64 profilerSamplingRateInNanoseconds, EventPipeProviderConfiguration *pProviders, UINT32 numProviders) { @@ -28,6 +28,15 @@ UINT64 QCALLTYPE EventPipeInternal::Enable( UINT64 sessionID = 0; + // Invalid input! + if (circularBufferSizeInMB == 0 || + profilerSamplingRateInNanoseconds == 0 || + numProviders == 0 || + pProviders == nullptr) + { + return 0; + } + BEGIN_QCALL; { sessionID = EventPipe::Enable( @@ -35,7 +44,9 @@ UINT64 QCALLTYPE EventPipeInternal::Enable( circularBufferSizeInMB, profilerSamplingRateInNanoseconds, pProviders, - numProviders); + numProviders, + outputFile != NULL ? EventPipeSessionType::File : EventPipeSessionType::Streaming, + nullptr); } END_QCALL; |