Home | History | Annotate | Download | only in quipper
      1 // Copyright 2016 The Chromium OS Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef CHROMIUMOS_WIDE_PROFILING_PERF_DATA_STRUCTURES_H_
      6 #define CHROMIUMOS_WIDE_PROFILING_PERF_DATA_STRUCTURES_H_
      7 
      8 #include <vector>
      9 
     10 #include "compat/string.h"
     11 #include "kernel/perf_event.h"
     12 
     13 // Data structures that are used by multiple modules.
     14 
     15 namespace quipper {
     16 
     17 // This is becoming more like a partial struct perf_evsel
     18 struct PerfFileAttr {
     19   struct perf_event_attr attr;
     20   string name;
     21   std::vector<uint64_t> ids;
     22 };
     23 
     24 struct PerfUint32Metadata {
     25   uint32_t type;
     26   std::vector<uint32_t> data;
     27 };
     28 
     29 struct PerfUint64Metadata {
     30   uint32_t type;
     31   std::vector<uint64_t> data;
     32 };
     33 
     34 struct PerfCPUTopologyMetadata {
     35   std::vector<string> core_siblings;
     36   std::vector<string> thread_siblings;
     37 };
     38 
     39 struct PerfNodeTopologyMetadata {
     40   uint32_t id;
     41   uint64_t total_memory;
     42   uint64_t free_memory;
     43   string cpu_list;
     44 };
     45 
     46 struct PerfPMUMappingsMetadata {
     47   uint32_t type;
     48   string name;
     49 };
     50 
     51 struct PerfGroupDescMetadata {
     52   string name;
     53   uint32_t leader_idx;
     54   uint32_t num_members;
     55 };
     56 
     57 }  // namespace quipper
     58 
     59 #endif  // CHROMIUMOS_WIDE_PROFILING_PERF_DATA_STRUCTURES_H_
     60