-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an interface for aggregating LBR data
PiperOrigin-RevId: 696608573
- Loading branch information
1 parent
8473a7b
commit 017b22e
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#ifndef PROPELLER_LBR_AGGREGATOR_H_ | ||
#define PROPELLER_LBR_AGGREGATOR_H_ | ||
|
||
#include "absl/status/statusor.h" | ||
#include "propeller/binary_content.h" | ||
#include "propeller/lbr_aggregation.h" | ||
#include "propeller/propeller_options.pb.h" | ||
#include "propeller/propeller_statistics.h" | ||
namespace propeller { | ||
// `LbrAggregator` is an abstraction around producing an `LbrAggregation`, | ||
// making the source of the aggregation (Perf data, memtrace, mock) opaque to | ||
// the user of the aggregation. | ||
class LbrAggregator { | ||
public: | ||
virtual ~LbrAggregator() = default; | ||
|
||
// Returns an `LbrAggregation` for the specified binary according to the given | ||
// options, or an `absl::Status` if a valid aggregation can't be produced. | ||
// | ||
// `AggregateLbrData` can fail for various reasons, depending on the | ||
// implementation. | ||
virtual absl::StatusOr<LbrAggregation> AggregateLbrData( | ||
const PropellerOptions& options, const BinaryContent& binary_content, | ||
PropellerStats& stats) = 0; | ||
}; | ||
|
||
} // namespace propeller | ||
|
||
#endif // PROPELLER_LBR_AGGREGATOR_H_ |