Home | History | Annotate | Download | only in track_event
      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 
     17 syntax = "proto2";
     18 option optimize_for = LITE_RUNTIME;
     19 
     20 package perfetto.protos;
     21 
     22 // Periodically emitted data that's common to all events emitted by the same
     23 // thread, i.e. all events in the same packet sequence. Valid for all subsequent
     24 // events in the same sequence.
     25 //
     26 // Next id: 8.
     27 message ThreadDescriptor {
     28   optional int32 pid = 1;
     29   optional int32 tid = 2;
     30 
     31   // To support old UI. New UI should determine default sorting by thread_type.
     32   optional int32 legacy_sort_index = 3;
     33 
     34   enum ChromeThreadType {
     35     THREAD_UNSPECIFIED = 0;
     36     // TODO(eseckler): Add thread types.
     37   };
     38   optional ChromeThreadType chrome_thread_type = 4;
     39 
     40   // TODO(eseckler): Replace this with ChromeThreadType where possible.
     41   optional string thread_name = 5;
     42 
     43   // Absolute reference values. Clock values in subsequent TrackEvents can be
     44   // encoded accumulatively and relative to these. This reduces their var-int
     45   // encoding size.
     46   optional int64 reference_timestamp_us = 6;
     47   optional int64 reference_thread_time_us = 7;
     48 }
     49