8000 Assume lttng trace when missing metadata by TApplencourt · Pull Request #404 · argonne-lcf/THAPI · GitHub
[go: up one dir, main page]

Skip to content

Assume lttng trace when missing metadata - #404

Merged
nscottnichols merged 1 commit into
develfrom
fix_tracer_$BACKEND
Sep 10, 2025
Merged

nscottnichols merged 1 commit into
develfrom
fix_tracer_$BACKEND

Conversation

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

Before the workflow:

$ tracer_ze.sh ze_info
$ iprof -r /home/applenco/lttng-traces/thapi-ze-session-20250908-231640

was broken due to

Error: /home/applenco/lttng-traces/thapi-ze-session-20250908-231640 isn't a valid trace (missing thapi_metadata.yaml)

It will now print

$ iprof -r /home/applenco/lttng-traces/thapi-ze-session-20250908-232318
THAPI: Trace location: /home/applenco/lttng-traces/thapi-ze-session-20250908-232318
Warning: /home/applenco/lttng-traces/thapi-ze-session-20250908-232318 isn't a valid trace (missing thapi_metadata.yaml), we will assume a lttng trace
BACKEND_ZE | 1 Hostnames | 1 Processes | 1 Threads |

                        Name |    Time | Time(%) | Calls |  Average |    Min |    Max |
       zeDeviceGetProperties |  5.14us |  24.39% |     6 | 856.17ns |  447ns | 2.15us |
                      zeInit |  3.75us |  17.81% |     1 |   3.75us | 3.75us | 3.75us |
       zeDriverGetApiVersion |  3.33us |  15.81% |     2 |   1.66us |  204ns | 3.12us |
 zeDeviceGetModuleProperties |  3.29us |  15.62% |     6 | 548.17ns |  224ns | 1.78us |
                 zeDeviceGet |  1.92us |   9.10% |     2 | 958.00ns |  320ns | 1.60us |
zeDeviceGetComputeProperties |  1.73us |   8.21% |     6 | 288.17ns |  157ns |  606ns |
                 zeDriverGet |  1.59us |   7.54% |     2 | 793.50ns |  575ns | 1.01us |
       zeDriverGetProperties |   323ns |   1.53% |     1 | 323.00ns |  323ns |  323ns |
                       Total | 21.06us | 100.00% |    26 |

Fix #346

@nscottnichols
Copy link
Copy Markdown
Contributor

Why this path instead of having the tracer_ze.sh create the metadata file?

@TApplencourt
TApplencourt commented Sep 9, 2025 •
Copy link
Copy Markdown
Collaborator Author

Because it was harder :')
I tried at first, a few problem:

  • lttng-session print the folder to std-out so need to capture that, parse and re-emit
  • lttng-session is lazy, so will only generate the file after the lttng-event is created
  • We have many (8?) tracer_$backend, so it's painful to do the change in all of them.

The more painfull point is the live mode, it make the change more complex as they need to be guarded.

In short it was just easier, less code change. One line versus hundread and was lazy. Sorry should have explained on the PR description

@nscottnichols nscottnichols left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@nscottnichols
nscottnichols merged commit 55a281f into devel Sep 10, 2025
@nscottnichols
nscottnichols deleted the fix_tracer_$BACKEND branch September 10, 2025 16:02
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.

[tracer_*] Cannot use babeltrace_thapi

2 participants

0