8000 Adding starting offset UUID for the timeline by colleeneb · Pull Request #411 · argonne-lcf/THAPI · GitHub
[go: up one dir, main page]

Skip to content

Adding starting offset UUID for the timeline - #411

Merged
TApplencourt merged 11 commits into
argonne-lcf:develfrom
colleeneb:adding_start_uuid_index
Sep 23, 2025
Merged

TApplencourt merged 11 commits into
argonne-lcf:develfrom
colleeneb:adding_start_uuid_index

Conversation

@colleeneb
@colleeneb colleeneb commented Sep 23, 2025 •
Copy link
Copy Markdown
Contributor

This adds in a starting UUID as a first step in offsetting the UUIDs for the timeline by the hostname.

This adds --output-offset OFFSET to babeltrace, with a default of 0, and then passes it to so that calling gen_perfetto_uuid will start at a specific offset. In the future this will be for setting a different offset per hostname.

@colleeneb colleeneb changed the title Adding start UUID index Adding starting offset UUID for the timeline Sep 23, 2025
Comment thread utils/babeltrace_thapi.in Outdated
graph.add(comp, 'timeline',
params: { 'output_path' => $options[:'output-path'] })
params: { 'output_path' => $options[:'output-path'],
'offset' => $options[:'output-offset'] })
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

what is this indentation?! My poor ocd!!! :p

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sorry! I updated it!

Comment thread xprof/btx_timeline.cpp Outdated
static perfetto_uuid_t gen_perfetto_uuid(timeline_dispatch_t *dispatch) {
// Start at one, Look like UUID 0 is special
static std::atomic<perfetto_uuid_t> uuid{1};
static std::atomic<perfetto_uuid_t> uuid{dispatch->start_uuid_index};
@TApplencourt TApplencourt Sep 23, 2025 •
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think we can remove the static for uuid and just put that atomic std::atomic<perfetto_uuid_t> uuid inside the dispatch, and in this function just do return uuid++; Will be cleaner IMO (and easy that now you did all the refactoring to pass dispatch 💪🏽 )

@TApplencourt
TApplencourt commented Sep 23, 2025 •
Copy link
Copy Markdown
Collaborator

Thanks a lot! Just one minor suggestion, I can do it my self if you prefer. So I approve and let you merge depending on what you want to do : )

@TApplencourt
Copy link
Copy Markdown
Collaborator

🎉 If you tried and sure it work, we can merge : ) But the CI is passing so I'm confident, but will be nice to open hte trace with perfetto just to be 110% sure

@TApplencourt
TApplencourt merged commit 9c654f0 into argonne-lcf:devel Sep 23, 2025
@TApplencourt
Copy link
Copy Markdown
Collaborator

Thanks a lot!

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

0