C#
csharp's Introduction
csharp's People
csharp's Issues
Initial work to port EventPipe library to NativeAOT
Getting EventPipe to full functionality as outlined in #79241 still has significant work remaining, but this PR is at a sweet spot between demonstrating end-to-end event data flowing from a NativeAOT application to a listening client and having too much new code to CR.
The current status allows a NativeAOT application to send EventSource events to a listening client (command CollectTracing2 in https://github.com/dotnet/diagnostics/blob/main/documentation/design-docs/ipc-protocol.md) in windows. This is done by adding a new opt-in library for AOT.
Managed EventSource Support | Native AOT Library | NativeAOT EventSource Application |
---|---|---|
Disabled | Disabled | Same behavior as .NET 7 |
Enabled | Enabled | Managed EventSource data and native ProcessInfo events are received by the listening client |
Disabled | Enabled | Native ProcessInfo event is received by the listening client |
Enabled | Disabled | Not supported |
The NativeAOT EventSource sample application is currently shown in reproNative and the listening client application is a .NET application similar to https://github.com/LakshanF/CSharp/blob/master/src/aot/experiments/Diagnostics/Logging/EventSource/DiagnsoticsClient/Program.cs
New Code
Although the 'new code' in this initial PR seems large with 6000+, there is really not much new code that is getting checked in as explained below. As outlined in https://github.com/dotnet/runtime/tree/main/src/native/eventpipe#eventpipe-and-diagnosticserver, NativeAOT EventPipe library uses the common code that both Mono and CoreCLR runtime uses and provides the following features as required by the EventPipe library;
- Container classes (this is currently being moved to common code. Specifically, when that happens, the container classes in this checkin will be removed). This checkin has around ~1000 lines of code for this.
- Runtime functionality. NativeAOT runtime code started with a copy of CoreCLR code and these checkins in the PR show a way to more easily see the differences. See this commit to see specific differences from the CoreCLR implementation easily. The changes here has around ~5000 lines of code.
The rest of the new code is mostly as below:
- Hooks between Managed and Native code to enable EventSource events to flow
- Some changes in the NativeAOT runtime side to support EventPipe
- Opt-in EventPipe library that contains hookup code from Startup.cpp to the EventPipe library (Aot.EventPipe.lib which is used when EventSource is enabled in NativeAOT and Aot.Disabled.EventPipe.lib when EventSource is disabled). This commit shows details
- Changes to EventPipe common code
- Build artifacts
- A native sample application with EventSource to demonstrate EventPipe. This is not meant to be checked in. A client application similar to this can be used to test.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.