2 * Copyright (C) 2017 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef SIMPLE_PERF_INPLACE_SAMPLER_LIB_H_
18 #define SIMPLE_PERF_INPLACE_SAMPLER_LIB_H_
20 enum InplaceSamplerMessageType {
22 START_PROFILING_REPLY,
30 // Type: START_PROFILING
31 // Direction: simpleperf to inplace_sampler
33 // char options[]; // ended by '\0'
35 // options[] contains space separated options like below:
36 // freq=4000 # sample at 4000/s.
37 // signal=14 # use signal 14 to raise sample recording.
38 // tids=1432,1433 # take samples of thread 1432,1433.
41 // Type: START_PROFILING_REPLY
42 // Direction: inplace_sampler to simpleperf
44 // char reply[]; // ended by '\0'
45 // reply[] contains a string, which is either 'ok' or 'error'
48 // Direction: inplace_sampler to simpleperf
52 // char thread_name[]; // ended by '\0'
55 // Direction: inplace_sampler to simpleperf
61 // char[] dso; // ended by '\0'
64 // Direction: inplace_sampler to simpleperf
70 // uint64_t ip[ip_nr];
72 // Type: END_PROFILING
73 // Direction: simpleperf to inplace_sampler
77 // Type: END_PROFILING_REPLY
78 // Direction: inplace_sampler to simpleperf
80 // uint64_t used_cpu_time;
81 // uint64_t lost_samples;
84 #endif // SIMPLE_PERF_INPLACE_SAMPLER_LIB_H_