Unverified Commit e63abc97 authored by yzhao1012's avatar yzhao1012 Committed by Copybara
Browse files

Add AttachTracepoints() which will be used later for proc_exit tracepoint


Test Plan: Added API is not used yet, tests will be added later.

Reviewers: #stirling, oazizi

Reviewed By: #stirling, oazizi

Subscribers: oazizi
Signed-off-by: default avataryzhao1012 <yzhao@pixielabs.ai>

Differential Revision: https://phab.corp.pixielabs.ai/D10860

GitOrigin-RevId: 48735bc353e40767345032b8fe52f110b4e3dc39
parent 3b73e360
Showing with 14 additions and 0 deletions
+14 -0
......@@ -232,6 +232,13 @@ Status BCCWrapper::AttachKProbes(const ArrayView<KProbeSpec>& probes) {
return Status::OK();
}
Status BCCWrapper::AttachTracepoints(const ArrayView<TracepointSpec>& probes) {
for (const TracepointSpec& spec : probes) {
PL_RETURN_IF_ERROR(AttachTracepoint(spec));
}
return Status::OK();
}
Status BCCWrapper::AttachUProbes(const ArrayView<UProbeSpec>& probes) {
for (const UProbeSpec& p : probes) {
PL_RETURN_IF_ERROR(AttachUProbe(p));
......
......@@ -282,6 +282,13 @@ class BCCWrapper {
*/
Status AttachKProbes(const ArrayView<KProbeSpec>& probes);
/**
* Convenience function that attaches multiple tracepoints.
* @param probes Vector of TracepointSpec.
* @return Error of first probe to fail to attach (remaining probe attachments are not attempted).
*/
Status AttachTracepoints(const ArrayView<TracepointSpec>& probes);
/**
* Convenience function that attaches multiple uprobes.
* @param probes Vector of probes.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment