Skip to content

Add new tarmac-chromejson tool for Chromium's Trace Event Format - #37

Closed
paultimkecontreras wants to merge 2 commits into
ARM-software:mainfrom
paultimkecontreras:feature/tarmac-chrome
Closed

Add new tarmac-chromejson tool for Chromium's Trace Event Format#37
paultimkecontreras wants to merge 2 commits into
ARM-software:mainfrom
paultimkecontreras:feature/tarmac-chrome

Conversation

@paultimkecontreras

Copy link
Copy Markdown
Contributor

This PR adds a new tool to translate tarmac files to Chromium's Trace Event Format (see https://chromium.googlesource.com/catapult/+/HEAD/docs/trace-event-format.md).

The first commit adds the tool itself, plus documentation, but only works on single trace files. The second commit extends the tool to add support for multiple trace files.

This is an example trace of the quicksort example visualized via Perfetto's viewer (https://ui.perfetto.dev/)
image

Add a tarmac-chromejson target that emits a Chrome trace event JSON file
from the reconstructed call tree. Also added tests using the existing
quicksort tarmac trace and image files.

For reference, see:
https://chromium.googlesource.com/catapult/+/HEAD/docs/trace-event-format.md

Signed-off-by: Paul Timke Contreras <paul.timkecontreras@arm.com>
Change-Id: I5dbe4f7aad7b2749c12a287e4e31b751a3e4cd09
Allow tarmac-chromejson to accept more than one Tarmac trace file and emit a
single Chrome trace JSON containing one thread lane per input trace.
This lets users see multicore traces on a single Chrome json with each
core on a separate lane.

Signed-off-by: Paul Timke Contreras <paul.timkecontreras@arm.com>
Change-Id: I4d66422c00449ddaed45c53da82e10e7e7f8ffab
Comment thread tests/CMakeLists.txt
add_test(NAME chrome-multi-trace-symbols
COMMAND ${test_driver_cmd}
--compare reffile:${CMAKE_CURRENT_SOURCE_DIR}/chrome-quicksort-multi-symbols.ref stdout
${CMAKE_BINARY_DIR}/tarmac-chrome --image ${CMAKE_CURRENT_SOURCE_DIR}/quicksort.elf ${CMAKE_CURRENT_SOURCE_DIR}/quicksort.tarmac ${CMAKE_CURRENT_SOURCE_DIR}/quicksort.tarmac

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.

Oops! CI points out that this test is still failing, because the binary it's trying to invoke is called tarmac-chrome, instead of tarmac-chromejson.

@statham-arm

Copy link
Copy Markdown
Contributor

Paul was unfortunately not available to continue working on this PR, so I made the change myself to fix the failing test, and have pushed the modified version of these two commits as 2c311b0 and 600e248.

@statham-arm statham-arm closed this Sep 3, 2026
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