1/*
2 * Copyright (C) 2019 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18
19package perfetto.protos;
20
21// Configuration for go/heapprofd.
22message JavaHprofConfig {
23  // If dump_interval_ms != 0, the following configuration is used.
24  message ContinuousDumpConfig {
25    // ms to wait before first continuous dump.
26    // A dump is always created at the beginning of the trace.
27    optional uint32 dump_phase_ms = 1;
28    // ms to wait between following dumps.
29    optional uint32 dump_interval_ms = 2;
30  }
31
32  // This input is normalized in the following way: if it contains slashes,
33  // everything up to the last slash is discarded. If it contains "@",
34  // everything after the first @ is discared.
35  // E.g. /system/bin/surfaceflinger@1.0 normalizes to surfaceflinger.
36  // This transformation is also applied to the processes' command lines when
37  // matching.
38  repeated string process_cmdline = 1;
39
40  // For watermark based triggering or local debugging.
41  repeated uint64 pid = 2;
42
43  // Only profile target if it was installed by one of the packages given.
44  // Special values are:
45  // * @system: installed on the system partition
46  // * @product: installed on the product partition
47  // * @null: sideloaded
48  // Supported on Android 12+.
49  repeated string target_installed_by = 7;
50
51  // Dump at a predefined interval.
52  optional ContinuousDumpConfig continuous_dump_config = 3;
53
54  // Do not profile processes whose anon RSS + swap < given value.
55  optional uint32 min_anonymous_memory_kb = 4;
56
57  // Include the process' /proc/self/smaps.
58  // This only shows maps that:
59  // * start with /system
60  // * start with /vendor
61  // * start with /data/app
62  // * contain "extracted in memory from Y", where Y matches any of the above
63  optional bool dump_smaps = 5;
64
65  // Exclude objects of the following types from the profile. This can be
66  // useful if lots of uninteresting objects, e.g. "sun.misc.Cleaner".
67  repeated string ignored_types = 6;
68}
69