• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2020 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 #ifndef INCLUDE_PERFETTO_EXT_TRACE_PROCESSOR_IMPORTERS_MEMORY_TRACKER_MEMORY_GRAPH_EDGE_H_
18 #define INCLUDE_PERFETTO_EXT_TRACE_PROCESSOR_IMPORTERS_MEMORY_TRACKER_MEMORY_GRAPH_EDGE_H_
19 
20 #include <stdint.h>
21 
22 #include "perfetto/base/export.h"
23 #include "perfetto/ext/trace_processor/importers/memory_tracker/memory_allocator_node_id.h"
24 
25 namespace perfetto {
26 namespace trace_processor {
27 
28 class PERFETTO_EXPORT_COMPONENT MemoryGraphEdge {
29  public:
MemoryGraphEdge(MemoryAllocatorNodeId s,MemoryAllocatorNodeId t,int i,bool o)30   MemoryGraphEdge(MemoryAllocatorNodeId s,
31                   MemoryAllocatorNodeId t,
32                   int i,
33                   bool o)
34       : source(s), target(t), importance(i), overridable(o) {}
35 
36   MemoryGraphEdge& operator=(const MemoryGraphEdge& edge) {
37     source = edge.source;
38     target = edge.target;
39     importance = edge.importance;
40     overridable = edge.overridable;
41     return *this;
42   }
43 
44   MemoryAllocatorNodeId source;
45   MemoryAllocatorNodeId target;
46   int importance;
47   bool overridable;
48 
49   // Deliberately copy-able.
50 };
51 
52 }  // namespace trace_processor
53 }  // namespace perfetto
54 
55 #endif  // INCLUDE_PERFETTO_EXT_TRACE_PROCESSOR_IMPORTERS_MEMORY_TRACKER_MEMORY_GRAPH_EDGE_H_
56