Skip to content

perfetto: heap_profile: introduce android subcommand#5047

Merged
LalitMaganti merged 4 commits intomainfrom
dev/lalitm/heap-profile-3
Mar 12, 2026
Merged

perfetto: heap_profile: introduce android subcommand#5047
LalitMaganti merged 4 commits intomainfrom
dev/lalitm/heap-profile-3

Conversation

@LalitMaganti
Copy link
Copy Markdown
Member

Restructure heap_profile to use argparse subparsers. A shared
common_parser holds all flags; the 'android' subcommand inherits
from it via parents=[common].

When no subcommand is given the tool defaults to 'android', so all
existing invocations continue to work unchanged. This prepares the
tool for a future 'host' subcommand for local Linux profiling.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 6, 2026

@LalitMaganti LalitMaganti force-pushed the dev/lalitm/heap-profile-3 branch from 5bbd366 to b8a5ce8 Compare March 6, 2026 21:04
@LalitMaganti LalitMaganti requested a review from rsavitski March 6, 2026 21:05
@LalitMaganti LalitMaganti marked this pull request as ready for review March 6, 2026 21:05
@LalitMaganti LalitMaganti requested a review from a team as a code owner March 6, 2026 21:05
traceconv writes its output (including the "Wrote profiles to <path>"
line) to stderr, not stdout. subprocess.check_output() only captures
stdout by default, so the profile path was never found and the script
always reported "No profiles generated" even when profiles existed.

Fix by passing stderr=subprocess.STDOUT so both streams are captured.
Restructure heap_profile to use argparse subparsers. A shared
common_parser holds all flags; the 'android' subcommand inherits
from it via parents=[common].

When no subcommand is given the tool defaults to 'android', so all
existing invocations continue to work unchanged. This prepares the
tool for a future 'host' subcommand for local Linux profiling.
@LalitMaganti LalitMaganti force-pushed the dev/lalitm/heap-profile-2 branch from b062d18 to 70427c7 Compare March 12, 2026 14:46
@LalitMaganti LalitMaganti force-pushed the dev/lalitm/heap-profile-3 branch from b8a5ce8 to a676ba2 Compare March 12, 2026 14:47
Base automatically changed from dev/lalitm/heap-profile-2 to main March 12, 2026 14:47
@LalitMaganti LalitMaganti merged commit e5ac0e5 into main Mar 12, 2026
8 checks passed
@LalitMaganti LalitMaganti deleted the dev/lalitm/heap-profile-3 branch March 12, 2026 14:47
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