-
Notifications
You must be signed in to change notification settings - Fork 30
Integrate debug counters #365
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
Conversation
|
How about implementing that as a new harness? Do you need to use this on multiple different harnesses? If you create |
|
I can make a harness if you prefer, but I was hoping to use this alongside the |
5809f79 to
dd710c2
Compare
If we compile ruby with debug counters and use that ruby for running yjit-bench, there's a mess of output due to the ruby subprocesses that get run (ex: `bundle install`). This is because by default, the output is shown at ruby exit. This change adds a new option `--show-debug-counters` that disables all debug counter output for everything except the benchmark scripts. The counters get reset before each benchmark script is run so that the counters during ruby initialization and prelude are not taken into account.
dd710c2 to
338466a
Compare
|
Oh ok, it seems fair to implement that on the harness-common then. |
| header = "itr: time" | ||
|
|
||
| RubyVM::YJIT.reset_stats! if defined?(RubyVM::YJIT) && RubyVM::YJIT.enabled? | ||
| RubyVM.reset_debug_counters if defined?(RubyVM.reset_debug_counters) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So are you fine with this not being used by the vernier harness? I think that's what confused me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you edited this file, I assume you tested this feature on this default harness. Given there's some overhead in using debug counters, I wonder if you really want to do both debug counters and vernier at the same time. The vernier profiling result could be off due to the overhead of debug counters, so you might want to do them separately anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah okay I understand your concerns. I think you're right, maybe I'll just create a new harness. I'll update the PR later this week 👍
|
I'm no longer interested in using debug counters for benchmarking, so I'm closing this for now. |
If we compile ruby with debug counters and use that ruby for running yjit-bench, there's a mess of output due to the ruby subprocesses that get run (ex:
bundle install). This is because by default, the output is shown at ruby exit. This change adds a new option--show-debug-countersthat disables all debug counter output for everything except the benchmark scripts. The counters get reset before each benchmark script is run so that the counters during ruby initialization and prelude are not taken into account.