Skip to content

Adding dynamic marker support #2

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

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

Conversation

John-Whigham
Copy link
Collaborator

The primary function of this PR is to add support for dynamic markers to the trace event profiler plugin. These are "Profiler.Default" markers where the actual name and category are passed as metadata and are typically emitted by APIs where the marker name is specified at runtime such as Profiler.BeginSample().

There are a number of other changes in this PR, each of which has been entered as a separate commit so they can be cherry picked if not all are desired:

  • Visual Studio project file updates:

    • Updated platform toolset from v141 to v142 (VS2017 to VS2019) to support required compiler features for the dynamic marker support.
    • Fixed warning about output folder not ending in a backslash.
    • Enabled warnings-as-errors to remove possibility of missing potentially serious issues
  • Fixed issue where maximum memory for capture couldn't be set higher than 2 GiB due to use of 32bit int in calculations. uint64_t is now used to support larger buffer sizes.

  • Fixed issue where the current total memory usage value wasn't being decreased when event blocks were being freed resulting in it increasing constantly and captures being aborted incorrectly if it passed the upper memory use limit after multiple captures despite memory being deallocated

  • Fixed issue where timestamps in events were being truncated to 32bit (signed) so any capture longer than 35 minutes was having it's timestamps wrapped round causing issues.

  • Added a memory barrier before writing the trace file to ensure all event data written by capturing threads is visible to the writing thread. This is a speculative change as I haven't observed any issues with memory visibility but I added it while tracking other issues down and thought leaving it in there couldn't hurt.

- Updated platform toolset from v141 to v142 (VS2017 to VS2019) to support required compiler features.
- Fixed warning about output folder not ending in a backslash.
- Enabled warnings-as-errors to remove possibility of missing potentially serious issues
…han 2 GiB due to use of 32bit int in calculations. uint64_t is now used to support larger buffer sizes.
…ecreased when event blocks were being freed resulting in it increasing constantly and captures being aborted incorrectly if it passed the upper memory use limit after multiple captures despite memory being deallocated
…(signed) so any capture longer than 35 minutes was having it's timestamps wrapped round causing issues.
…ent data written by capturing threads is visible to the writing thread
…sed as metadata for the "Profiler.Default" marker
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.

1 participant