| /* |
| * Copyright (C) 2023 The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| syntax = "proto2"; |
| |
| package perfetto.protos; |
| |
| // Representation of a stack. To be used as input to generate flame charts |
| // or pprof. |
| message Stack { |
| // A stack is an ordered list of these entries. Think of them as frames in the |
| // stack, although we support entire call stacks as an entry (for efficiency, |
| // no need to copy entire stacks around if we can just copy a callsite_id). |
| message Entry { |
| oneof entry { |
| string name = 1; |
| uint32 callsite_id = 2; |
| uint32 annotated_callsite_id = 3; |
| uint32 frame_id = 4; |
| } |
| } |
| // Ordered list of "frames" in the stack. Leaf is at index 0. |
| // Note that we call these entries and not frames because an entire call stack |
| // can be referenced in one entry (via callsite_id). |
| repeated Entry entries = 1; |
| } |