2 * Copyright (C) 2015 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_RECORD_FILE_FORMAT_H_
18 #define SIMPLE_PERF_RECORD_FILE_FORMAT_H_
20 #include "perf_event.h"
22 // The file structure of perf.data:
29 // The feature section has the following structure:
30 // a section descriptor array, each element contains the section information of one add_feature.
31 // data section of feature 1
32 // data section of feature 2
35 namespace PerfFileFormat {
39 FEAT_FIRST_FEATURE = 1,
40 FEAT_TRACING_DATA = 1,
66 static const char* PERF_MAGIC = "PERFILE2";
74 SectionDesc event_types;
75 unsigned char features[FEAT_MAX_NUM / 8];
83 } // namespace PerfFileFormat
85 #endif // SIMPLE_PERF_RECORD_FILE_FORMAT_H_