-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
704 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
src/coreclr/nativeaot/Runtime/AotDisabledEventPipeInterface.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
void EventPipeAdapter_Initialize() {} | ||
|
||
bool DiagnosticServerAdapter_Initialize() { return false; } | ||
void DiagnosticServerAdapter_PauseForDiagnosticsMonitor() {} | ||
|
||
void EventPipeAdapter_FinishInitialize() {} | ||
|
||
void EventPipeAdapter_Shutdown() {} | ||
bool DiagnosticServerAdapter_Shutdown() { return false; } |
17 changes: 17 additions & 0 deletions
17
src/coreclr/nativeaot/Runtime/AotEnabledEventPipeInterface.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
#include "eventpipeadapter.h" | ||
#include "diagnosticserveradapter.h" | ||
|
||
|
||
void EventPipeAdapter_Initialize() { EventPipeAdapter::Initialize(); } | ||
|
||
bool DiagnosticServerAdapter_Initialize() { return DiagnosticServerAdapter::Initialize(); } | ||
void DiagnosticServerAdapter_PauseForDiagnosticsMonitor() { DiagnosticServerAdapter::PauseForDiagnosticsMonitor();} | ||
|
||
|
||
void EventPipeAdapter_FinishInitialize() { EventPipeAdapter::FinishInitialize(); } | ||
|
||
void EventPipeAdapter_Shutdown() { EventPipeAdapter::Shutdown(); } | ||
bool DiagnosticServerAdapter_Shutdown() { return DiagnosticServerAdapter::Shutdown(); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
#ifndef __EVENTPIPE_INTERFACE_H__ | ||
#define __EVENTPIPE_INTERFACE_H__ | ||
|
||
// Initialize EventPipe | ||
void EventPipeAdapter_Initialize(); | ||
|
||
// Initialize DS | ||
bool DiagnosticServerAdapter_Initialize(); | ||
void DiagnosticServerAdapter_PauseForDiagnosticsMonitor(); | ||
|
||
|
||
void EventPipeAdapter_FinishInitialize(); | ||
|
||
void EventPipeAdapter_Shutdown(); | ||
bool DiagnosticServerAdapter_Shutdown(); | ||
|
||
#endif //__EVENTPIPE_INTERFACE_H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
#ifndef __DIAGNOSTIC_SERVER_ADAPTER_H__ | ||
#define __DIAGNOSTIC_SERVER_ADAPTER_H__ | ||
|
||
#if defined(FEATURE_PERFTRACING) | ||
|
||
#include <eventpipe/ds-server.h> | ||
|
||
class DiagnosticServerAdapter final | ||
{ | ||
public: | ||
static inline bool Initialize() | ||
{ | ||
return ds_server_init(); | ||
} | ||
|
||
static inline bool Shutdown() | ||
{ | ||
return ds_server_shutdown(); | ||
} | ||
|
||
NOINLINE static void PauseForDiagnosticsMonitor() | ||
{ | ||
return ds_server_pause_for_diagnostics_monitor(); | ||
} | ||
|
||
static void ResumeRuntimeStartup() | ||
{ | ||
return ds_server_resume_runtime_startup(); | ||
} | ||
|
||
static bool IsPausedInRuntimeStartup() | ||
{ | ||
return ds_server_is_paused_in_startup(); | ||
} | ||
}; | ||
|
||
#endif // FEATURE_PERFTRACING | ||
|
||
#endif // __DIAGNOSTIC_SERVER_ADAPTER_H__ |
Oops, something went wrong.