Skip to content

[native] Improvements to the internal timing infrastructure #9993

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 9 commits into from
Apr 14, 2025

Conversation

grendello
Copy link
Contributor

@grendello grendello commented Apr 1, 2025

  • Make timing infrastructure shared between MonoVM and CoreCLR hosts.
  • Use C++ APIs instead of some of our own ones (std::chrono)
  • Make it possible to dump timings into a file instead of logcat
  • Timing events no longer require declaring a variable to hold the timing
    sequence ID. Instead, calls to start and end events are now using a thread-local
    stack.
  • Add a way to time a single function call by wrapping it in a time_call timing function.

@grendello grendello force-pushed the dev/grendel/timing-revamp branch 5 times, most recently from 6095cbe to f7b2f17 Compare April 9, 2025 09:38
@grendello grendello force-pushed the dev/grendel/timing-revamp branch from f7b2f17 to 5f8341c Compare April 9, 2025 18:39
@grendello grendello marked this pull request as ready for review April 10, 2025 07:53
@grendello grendello requested a review from jonpryor as a code owner April 10, 2025 07:53
@grendello
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@grendello
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@grendello
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@grendello
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@grendello grendello marked this pull request as draft April 11, 2025 09:01
@grendello grendello force-pushed the dev/grendel/timing-revamp branch from f663a34 to 7823b27 Compare April 11, 2025 17:07
@grendello grendello marked this pull request as ready for review April 11, 2025 17:08
@@ -57,6 +60,7 @@ namespace xamarin::android {
static inline constexpr std::string_view DEBUG_MONO_SOFT_BREAKPOINTS { "debug.mono.soft_breakpoints" };
static inline constexpr std::string_view DEBUG_MONO_TRACE_PROPERTY { "debug.mono.trace" };
static inline constexpr std::string_view DEBUG_MONO_WREF_PROPERTY { "debug.mono.wref" };
static constexpr std::string_view DEBUG_MONO_TIMING { "debug.mono.timing" };
Copy link
Member

Choose a reason for hiding this comment

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

Ongoing question, which shouldn't be addressed here, is "should CoreCLR and MonoVM use the same set of properties?"

For example, b217dca parses a debug.dotnet.log system property instead of debug.mono.log, specifically because NativeAOT does not support the "full" set of values & semantics that debug.mono.log provides.

Perhaps "timing" is identical, but this is something to (re)consider in the future.

@jonpryor jonpryor merged commit 747041d into main Apr 14, 2025
57 of 59 checks passed
@jonpryor jonpryor deleted the dev/grendel/timing-revamp branch April 14, 2025 18:10
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.

2 participants