Skip to content

Support disabling event tracing #110622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 14, 2025

Conversation

cshung
Copy link
Member

@cshung cshung commented Dec 11, 2024

These fixes make it possible to turn off FEATURE_EVENT_TRACE during build.

@janvorli

@lateralusX
Copy link
Member

We had a similar build issue when bringing up Android runtime builds on CoreCLR, at one point it disabled the FEATURE_EVENT_TRACE using:

<_CoreClrBuildArg Include="-cmakeargs -DFEATURE_EVENT_TRACE=0"/>

and that caused the following error:

C:\git\runtime\src\coreclr\inc\profilepriv.h(388,34): error C2061: syntax error: identifier 'EventPipeProvider' [C:\git\runtime\artifacts\obj\coreclr\windows.x64.Debug\ide\debug\daccess\daccess.vcxproj]

So looks like this PR will fix that issue!

One thought, looks like the profilepriv.h introduce the typedef typedef struct _EventPipeProvider EventPipeProvider using a different define, FEATURE_PERF_TRACING, compared to what's being used in eventpipeadaptertypes.h, FEATURE_PERFTRACING, intentional?

@cshung cshung force-pushed the public/support-disable-event-tracing branch from e08ca5c to 7586491 Compare February 5, 2025 19:56
@lateralusX
Copy link
Member

@cshung I had one last small comment on one define usage. Once that is adjusted do you believe this PR is ready to go?

@cshung
Copy link
Member Author

cshung commented Feb 12, 2025

@cshung I had one last small comment on one define usage.

Thanks for all the review! I will fix the last define usage.

Once that is adjusted do you believe this PR is ready to go?

From my perspective, it is ready to go.

To goal of this PR is simply to allow people to experiment with turning off FEATURE_EVENT_TRACE, so that they can try out things (e.g. try it on new architecture where code inside FEATURE_EVENT_TRACE is giving trouble). It is not meant for making sure everything works fine with that. For example, we knew some test cases that relies on tracing fails, and that is expected.

I believe the most recent "Experimentally switch off ..." commit showed that it is the case, so I think this PR acomplished its goal. Of course, we aren't going to merge that commit.

@lateralusX lateralusX self-requested a review February 13, 2025 14:56
Copy link
Member

@lateralusX lateralusX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@cshung cshung force-pushed the public/support-disable-event-tracing branch from eaf6248 to 3bac234 Compare February 13, 2025 23:02
@cshung cshung force-pushed the public/support-disable-event-tracing branch from 3bac234 to a824dee Compare February 14, 2025 15:36
@cshung cshung merged commit 79eed94 into dotnet:main Feb 14, 2025
155 of 160 checks passed
@cshung cshung deleted the public/support-disable-event-tracing branch February 14, 2025 19:06
@github-actions github-actions bot locked and limited conversation to collaborators Mar 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants