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

Smaller energy thapi #148

Merged
merged 5 commits into from
Sep 11, 2023
Merged

Smaller energy thapi #148

merged 5 commits into from
Sep 11, 2023

Conversation

TApplencourt
Copy link
Collaborator

@TApplencourt TApplencourt commented Sep 11, 2023

This use babeltrace_thapi to replace babelatrace_energy.

Handle it as a a normal event. We can add new option to the CLI to filter it or whatever if you want.

Please tests is Solomon, I didn't...

@Kerilk
Copy link
Collaborator

Kerilk commented Sep 11, 2023

You would need to use it with --backend=[] to get the same behavior, right?
On a side note, why is it called banckend when it takes an array? Shouldn't it be called --backends?

@TApplencourt
Copy link
Collaborator Author

Oh yeah it's ze_ event you are right. And will fix the typo.

@Kerilk
Copy link
Collaborator

Kerilk commented Sep 11, 2023

No, I meant thapi_energy was only displaying the energy none of the other events, not even the level zero ones. So maybe we should add a new backend, sampling comes to mind.

@TApplencourt
Copy link
Collaborator Author

Yeah, this is what I wrote on the description. I can add an option if you'd like to. But I guess you can grep the output for now

If we want to be general, we want to add an option to visualize only specific regex or whatever. Aka adding a filter before the pretty print sink.

@Kerilk
Copy link
Collaborator

Kerilk commented Sep 11, 2023

Ho yeah, hadn't seen your comment in the code. Let wait for @sbekele81 feedback then.

@sbekele81
Copy link
Collaborator

sbekele81 commented Sep 11, 2023

I'm getting the following error when I ran the script: /home/sbekele/thapi-bin-new/bin/babeltrace_thapi:191:in block (3 levels) in get_components': no implicit conversion of Array into String (TypeError) from /home/sbekele/thapi-bin-new/bin/babeltrace_thapi:177:in each'
from /home/sbekele/thapi-bin-new/bin/babeltrace_thapi:177:in block (2 levels) in get_components' from /soft/packaging/spack/gnu-ldpath/build/linux-sles15-x86_64/gcc-11.2.0/ruby-3.1.0-55x7hesrduyvjspadyesab5n4llbevol/lib/ruby/gems/3.1.0/gems/babeltrace2-0.1.4/lib/babeltrace2/graph/graph.rb:114:in block in _wrap_graph_simple_sink_component_consume_func'
from /soft/packaging/spack/gnu-ldpath/build/linux-sles15-x86_64/gcc-11.2.0/ruby-3.1.0-55x7hesrduyvjspadyesab5n4llbevol/lib/ruby/gems/3.1.0/gems/babeltrace2-0.1.4/lib/babeltrace2/graph/graph.rb:452:in bt_graph_run' from /soft/packaging/spack/gnu-ldpath/build/linux-sles15-x86_64/gcc-11.2.0/ruby-3.1.0-55x7hesrduyvjspadyesab5n4llbevol/lib/ruby/gems/3.1.0/gems/babeltrace2-0.1.4/lib/babeltrace2/graph/graph.rb:452:in run'
from /home/sbekele/thapi-bin-new/bin/babeltrace_thapi:368:in <main>' from component-class-sink-simple.c:181. from graph.c:469. from /soft/packaging/spack/gnu-ldpath/build/linux-sles15-x86_64/gcc-11.2.0/ruby-3.1.0-55x7hesrduyvjspadyesab5n4llbevol/lib/ruby/gems/3.1.0/gems/babeltrace2-0.1.4/lib/babeltrace2/graph/graph.rb:455:in run'
from thapi-bin-new/bin/babeltrace_thapi:368:in `

'

As you mentioned, babeltrace_energy calculates the delta energy and generates the power series. if we are going to include it in the babeltrace_thapi, it would be nice that we have an option to filter.

@TApplencourt
Copy link
Collaborator Author

TApplencourt commented Sep 11, 2023

May work now.

As you mentioned, babeltrace_energy calculates the delta energy and generates the power series. if we are going to include it in the babeltrace_thapi, it would be nice that we have an option to filter.

Do you think a grep is sufficient? If not the general solution is to create a new regex filter.
We can also add --energy-only option in the tally but I don't like to add a new options as it's always hard to maintain

@sbekele81
Copy link
Collaborator

sbekele81 commented Sep 11, 2023

I think grep will do it. However, the error still persists.

@TApplencourt
Copy link
Collaborator Author

Fix now

@TApplencourt TApplencourt merged commit f93006a into master Sep 11, 2023
@TApplencourt TApplencourt deleted the smaller_energy_thapi branch September 11, 2023 23: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.

3 participants