From 479820c312b01082046354f662eae1c0b2964656 Mon Sep 17 00:00:00 2001 From: Miguel Juarez Lopez Date: Thu, 5 Nov 2026 13:06:41 -0500 Subject: [PATCH 1/3] workflow: add the HEAP_PROFILE_TRACE well-known command Co-Authored-By: Claude Opus 5.5 --- .../workflow/v1/workflow_command.proto | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/src/bitdrift_public/protobuf/workflow/v1/workflow_command.proto b/src/bitdrift_public/protobuf/workflow/v1/workflow_command.proto index d5bf093..6b7b717 100644 --- a/src/bitdrift_public/protobuf/workflow/v1/workflow_command.proto +++ b/src/bitdrift_public/protobuf/workflow/v1/workflow_command.proto @@ -177,6 +177,45 @@ enum WellKnownCommandType { } ] }]; + HEAP_PROFILE_TRACE = 4 [(well_known_command_options) = { + key: "heap_profile_trace" + description: "Captures a Perfetto heap profile of the application's process." + availability: { + supported_platforms: [ + { + platform: ANDROID + min_os_version: "15" + min_config_version: 51 + } + ] + } + argument_definitions: [ + { + name: "duration_ms" + type: INT64 + description: "How long to profile, in milliseconds." + default_value: {sint_data: 5000} + }, + { + name: "buffer_size_kb" + type: INT64 + description: "Trace buffer size in KB." + default_value: {sint_data: 8192} + }, + { + name: "sampling_interval_bytes" + type: INT64 + description: "Mean number of bytes allocated between two recorded samples." + default_value: {sint_data: 65536} + }, + { + name: "track_java_allocations" + type: BOOL + description: "Records Java heap allocations instead of native ones; a profile records one or the other." + default_value: {bool_data: false} + } + ] + }]; } // Selects one locally registered or built-in workflow command. From 74cc45f033555a91333aa5b2117c96eae599f3da Mon Sep 17 00:00:00 2001 From: Miguel Juarez Lopez Date: Thu, 5 Nov 2026 13:27:25 -0500 Subject: [PATCH 2/3] workflow: default track_java_allocations to true Co-Authored-By: Claude Opus 5.5 --- src/bitdrift_public/protobuf/workflow/v1/workflow_command.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bitdrift_public/protobuf/workflow/v1/workflow_command.proto b/src/bitdrift_public/protobuf/workflow/v1/workflow_command.proto index 6b7b717..6da5ada 100644 --- a/src/bitdrift_public/protobuf/workflow/v1/workflow_command.proto +++ b/src/bitdrift_public/protobuf/workflow/v1/workflow_command.proto @@ -212,7 +212,7 @@ enum WellKnownCommandType { name: "track_java_allocations" type: BOOL description: "Records Java heap allocations instead of native ones; a profile records one or the other." - default_value: {bool_data: false} + default_value: {bool_data: true} } ] }]; From 16d1b7212d776adf9ac19be0fc12816e11655d25 Mon Sep 17 00:00:00 2001 From: Matt Klein Date: Thu, 19 Nov 2026 09:49:02 -0700 Subject: [PATCH 3/3] Gate the heap profile command on config version 52 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/bitdrift_public/protobuf/workflow/v1/workflow_command.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bitdrift_public/protobuf/workflow/v1/workflow_command.proto b/src/bitdrift_public/protobuf/workflow/v1/workflow_command.proto index c83d263..16f5480 100644 --- a/src/bitdrift_public/protobuf/workflow/v1/workflow_command.proto +++ b/src/bitdrift_public/protobuf/workflow/v1/workflow_command.proto @@ -587,7 +587,7 @@ enum WellKnownCommandType { { platform: ANDROID min_os_version: "15" - min_config_version: 53 + min_config_version: 52 } ] }