Skip to content

add Samsung Gperf plugin to parse GPERF logcat - #173

Closed
dfriederich wants to merge 1 commit into
sokatoafrom
samsung_gperf
Closed

dfriederich wants to merge 1 commit into
sokatoafrom
samsung_gperf

Conversation

@dfriederich

Copy link
Copy Markdown
Collaborator

Add com.samsung.Gperf plugin that parses AMIGO gperf daemon logcat lines already present in the trace (tag=GPERF) into per-domain frequency, FPS, and state counters, rendering them as counter tracks grouped under a "Gperf" node.

Parsing/visualization only. Does not enable logcat capture or set up GPERF logcat tags/filters -- assumes the GPERF lines are already in the loaded trace.

Register the plugin in default_plugins.ts.

Contributed by patch From: Heo Dongcheol (Samsung)

Add com.samsung.Gperf plugin that parses AMIGO gperf daemon logcat
lines already present in the trace (tag=GPERF) into per-domain
frequency, FPS, and state counters, rendering them as counter tracks
grouped under a "Gperf" node.

Parsing/visualization only. Does not enable logcat capture or set up
GPERF logcat tags/filters -- assumes the GPERF lines are already in
the loaded trace.

Register the plugin in default_plugins.ts.

[Co-Developed using AI]: Claude-sonnet-5
Contributed by patch From: Heo Dongcheol (Samsung)
@wpaul-samsung
wpaul-samsung requested a review from cdamus July 21, 2026 13:45
@wpaul-samsung

Copy link
Copy Markdown
Collaborator

This is intended for Sokatoa only. Should this just be added as a plugin in Sokatoa rather than here?

@wpaul-samsung

Copy link
Copy Markdown
Collaborator

This is intended for Sokatoa only. Should this just be added as a plugin in Sokatoa rather than here?

@cdamus This is really a question for you. This was authored by Dongcheol. I just asked Daniel to create the PR on his behalf.

@cdamus

cdamus commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

This is intended for Sokatoa only. Should this just be added as a plugin in Sokatoa rather than here?

@cdamus This is really a question for you. This was authored by Dongcheol. I just asked Daniel to create the PR on his behalf.

Agreed @wpaul-samsung this belongs in the Sokatoa side where Perfetto plug-ins are fully supported with some DI services. I can rehome it when I return from vacation next week if you'd like to assign that to me 😀

@wpaul-samsung

Copy link
Copy Markdown
Collaborator

This is intended for Sokatoa only. Should this just be added as a plugin in Sokatoa rather than here?

@cdamus This is really a question for you. This was authored by Dongcheol. I just asked Daniel to create the PR on his behalf.

Agreed @wpaul-samsung this belongs in the Sokatoa side where Perfetto plug-ins are fully supported with some DI services. I can rehome it when I return from vacation next week if you'd like to assign that to me 😀

What the heck are you doing replying to this while on vacation!?! Yes. Please do when you get back, but not a minute sooner!

Comment on lines +68 to +72
{col: `${d.slug}_freq`, title: 'Freq', key: 'F=', idx: i, unit: 'MHz', group: d.label},
{col: `${d.slug}_active`, title: 'Active', key: 'AR=', idx: i, unit: '%', group: d.label},
{col: `${d.slug}_temp`, title: 'Temp', key: 'T=', idx: i, unit: '°C', group: d.label},
{col: `${d.slug}_freq_min`, title: 'Freq (min)', key: 'L/H=', idx: 2 * i, unit: 'MHz', group: d.label},
{col: `${d.slug}_freq_max`, title: 'Freq (max)', key: 'L/H=', idx: 2 * i + 1, unit: 'MHz', group: d.label},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

unit: 'MHz' makes the track range label render oddly: toLabel in base_counter_track.ts auto-applies an SI prefix to the raw value then appends the literal unit, so 1000 shows as "1K MHz" (kilo-MHz) on the freq track's range label. Values <1000 ("768 MHz") look fine; >=1000 break.

Fix: store the base SI unit (Hz) and let perfetto scale the prefix -- add scale: 1e6, unit: 'Hz' to the three freq metrics:

{col: `${d.slug}_freq`,     title: 'Freq',       key: 'F=',   idx: i,         scale: 1e6, unit: 'Hz', group: d.label},
{col: `${d.slug}_freq_min`, title: 'Freq (min)', key: 'L/H=', idx: 2 * i,     scale: 1e6, unit: 'Hz', group: d.label},
{col: `${d.slug}_freq_max`, title: 'Freq (max)', key: 'L/H=', idx: 2 * i + 1, scale: 1e6, unit: 'Hz', group: d.label},

Then 1000 MHz renders as "1GHz" and 3801 as "3.8GHz", tooltip in Hz. Verified locally on s5e9955.

@wpaul-samsung

Copy link
Copy Markdown
Collaborator

This will be moved into a Samsung extension to Sokatoa instead.

@wpaul-samsung
wpaul-samsung deleted the samsung_gperf branch July 24, 2026 12:49
@cdamus

cdamus commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

This will be moved into a Samsung extension to Sokatoa instead.

@wpaul-samsung is there a ticket for this? Is there something for me to follow up?

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.

4 participants