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

Do not ignore the very last events #62

Open
daladim opened this issue Nov 3, 2022 · 0 comments
Open

Do not ignore the very last events #62

daladim opened this issue Nov 3, 2022 · 0 comments

Comments

@daladim
Copy link
Collaborator

daladim commented Nov 3, 2022

Since (a PR to come, probably #63), we're ignoring the very last ETW events that were still in the buffers when we called CloseTrace

We may want to process them, and drop the memory structures when we're sure every event is processed.
See

/// TODO: it _might_ be possible to know whether we've processed the last buffered event, as
///       ControlTraceW(EVENT_TRACE_CONTROL_QUERY) _might_ tell us if the buffers are empty or not.
///       In case the trace is in ERROR_CTX_CLOSE_PENDING state, we could call this after every
///       callback so that we know when to actually free memory used by the (now useless) callback.
///       Maybe also setting the BufferCallback in EVENT_TRACE_LOGFILEW may help us.
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

1 participant