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

Unify. NET wrappers of callbacks and more optimizations #255

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

wwh1004
Copy link
Contributor

@wwh1004 wwh1004 commented Feb 1, 2025

  1. Unify. NET wrappers of callbacks to simplify logic
  2. Add no throw version of get_event_schema and also cache error status
  3. Merge the ability of RawProvider to Provider to reduce the fragmentation of code functionality
  4. Remove invalid GCHandle usages
  5. Use schema_locator.get_event_schema_no_throw in ut::forward_events to avoid exceptions
  6. Check status code instead of throw then catch exceptions to gain more performance
  7. Also cache EventRecord and EventRecordError objects like EventRecordMetadata to reduce allocations

Closes #252
Closes #253

Copy link
Member

@kylereedmsft kylereedmsft left a comment

Choose a reason for hiding this comment

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

This PR looks really good. Thank you for the work.
I have a few comments, and I'd like you to change the macro to be a template function instead.

Microsoft.O365.Security.Native.ETW/ITrace.hpp Show resolved Hide resolved
krabs/krabs/ut.hpp Outdated Show resolved Hide resolved
Microsoft.O365.Security.Native.ETW/Callbacks.hpp Outdated Show resolved Hide resolved
Microsoft.O365.Security.Native.ETW/Callbacks.hpp Outdated Show resolved Hide resolved
Rename CallbackBridge::Create* to CallbackBridge::Wrap*
kylereedmsft
kylereedmsft previously approved these changes Feb 5, 2025
Copy link
Member

@kylereedmsft kylereedmsft left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. These are good improvements.

@kylereedmsft kylereedmsft dismissed their stale review February 5, 2025 20:10

Merge conflict

Copy link
Member

@kylereedmsft kylereedmsft left a comment

Choose a reason for hiding this comment

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

There are merge conflicts with the other PR. Can you pull main, resolve the conflicts and I'll approve. Thanks!

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

Successfully merging this pull request may close these issues.

Is schema valid for WPP event? could_not_find_schema exception was thrown when stop tracing
2 participants