File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,20 @@ cc_library(
140
140
],
141
141
)
142
142
143
+ cc_library (
144
+ name = "lbr_aggregator" ,
145
+ hdrs = [
146
+ "lbr_aggregator.h" ,
147
+ ],
148
+ deps = [
149
+ ":binary_content" ,
150
+ ":lbr_aggregation" ,
151
+ ":propeller_options_cc_proto" ,
152
+ ":propeller_statistics" ,
153
+ "@abseil-cpp//absl/status:statusor" ,
154
+ ],
155
+ )
156
+
143
157
cc_library (
144
158
name = "addr2cu" ,
145
159
srcs = ["addr2cu.cc" ],
Original file line number Diff line number Diff line change
1
+ #ifndef PROPELLER_LBR_AGGREGATOR_H_
2
+ #define PROPELLER_LBR_AGGREGATOR_H_
3
+
4
+ #include " absl/status/statusor.h"
5
+ #include " propeller/binary_content.h"
6
+ #include " propeller/lbr_aggregation.h"
7
+ #include " propeller/propeller_options.pb.h"
8
+ #include " propeller/propeller_statistics.h"
9
+ namespace propeller {
10
+ // `LbrAggregator` is an abstraction around producing an `LbrAggregation`,
11
+ // making the source of the aggregation (Perf data, memtrace, mock) opaque to
12
+ // the user of the aggregation.
13
+ class LbrAggregator {
14
+ public:
15
+ virtual ~LbrAggregator () = default ;
16
+
17
+ // Returns an `LbrAggregation` for the specified binary according to the given
18
+ // options, or an `absl::Status` if a valid aggregation can't be produced.
19
+ //
20
+ // `AggregateLbrData` can fail for various reasons, depending on the
21
+ // implementation.
22
+ virtual absl::StatusOr<LbrAggregation> AggregateLbrData (
23
+ const PropellerOptions& options, const BinaryContent& binary_content,
24
+ PropellerStats& stats) = 0;
25
+ };
26
+
27
+ } // namespace propeller
28
+
29
+ #endif // PROPELLER_LBR_AGGREGATOR_H_
You can’t perform that action at this time.
0 commit comments