Skip to content
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

Improve realtime performance with better filtering. #32

Closed
jenatali opened this issue Jun 7, 2017 · 4 comments
Closed

Improve realtime performance with better filtering. #32

jenatali opened this issue Jun 7, 2017 · 4 comments

Comments

@jenatali
Copy link
Collaborator

jenatali commented Jun 7, 2017

When calling EnableTraceEx2 with the ENABLE_PROVIDER control code, we have the opportunity to pass an ENABLE_TRACE_PARAMETERS struct. We should do so, and include the EVENT_ENABLE_PROPERTY_IGNORE_KEYWORD_0 flag, along with a filter.

We can provide an EVENT_FILTER_DESCRIPTOR entry with type EVENT_FILTER_TYPE_EVENT_ID. The EVENT_FILTER_EVENT_ID struct that we pass should be filled out with FilterIn set to TRUE, indicating that the events are to be included and not excluded, and the array filled with events that PresentMon knows how to handle.

The Handler struct will need to be extended to include the set of known event IDs, and the AddProvider method will need to be extended as well.

@JeffersonMontgomery-Intel
Copy link
Collaborator

Hey Jesse, just fyi I have this implemented and will push once tested/scanned.

It doesn't seem to work when consuming ETL, but I only get used events when capturing realtime. I measured capturing a simple graphics app for 30s and observed 0.6x cpu time.

@jenatali
Copy link
Collaborator Author

That's awesome! Yeah, it's only a property that applies to the producing side, not the consuming side. You should also see reduced CPU overhead from the components producing the ETW, because they should be sending less data.

Thanks for tackling this!

JeffersonMontgomery-Intel added a commit that referenced this issue Aug 27, 2019
…eeded.

Only works for realtime capture on win8.1+.

CPU time for 30s capture of d3d11_triangle decreased from 278.201 to
159.372 ms.

See issue #32.
@JeffersonMontgomery-Intel
Copy link
Collaborator

Pushed to master. I also made a change where I always use the event metadata and populate it if it's missing, which also has a significant performance benefit.

I'll leave it in master for a bit to give time to shake out any issues, then will create a new versioned release.

@jenatali
Copy link
Collaborator Author

Wow, I'm really impressed by the amount of refactoring and improving that just happened. Great job!

JeffersonMontgomery-Intel pushed a commit that referenced this issue Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants