aboutsummaryrefslogtreecommitdiff
path: root/src/tracing/debug_annotation.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/tracing/debug_annotation.cc')
-rw-r--r--src/tracing/debug_annotation.cc24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/tracing/debug_annotation.cc b/src/tracing/debug_annotation.cc
index add115a62..81e889c22 100644
--- a/src/tracing/debug_annotation.cc
+++ b/src/tracing/debug_annotation.cc
@@ -16,15 +16,33 @@
#include "perfetto/tracing/debug_annotation.h"
-#include "perfetto/tracing/traced_value.h"
#include "protos/perfetto/trace/track_event/debug_annotation.pbzero.h"
namespace perfetto {
DebugAnnotation::~DebugAnnotation() = default;
-void DebugAnnotation::WriteIntoTracedValue(TracedValue context) const {
- Add(context.context_);
+namespace internal {
+
+void WriteDebugAnnotation(protos::pbzero::DebugAnnotation* annotation,
+ const char* value) {
+ annotation->set_string_value(value);
+}
+
+void WriteDebugAnnotation(protos::pbzero::DebugAnnotation* annotation,
+ const std::string& value) {
+ annotation->set_string_value(value);
+}
+
+void WriteDebugAnnotation(protos::pbzero::DebugAnnotation* annotation,
+ const void* value) {
+ annotation->set_pointer_value(reinterpret_cast<uint64_t>(value));
+}
+
+void WriteDebugAnnotation(protos::pbzero::DebugAnnotation* annotation,
+ const DebugAnnotation& custom_annotation) {
+ custom_annotation.Add(annotation);
}
+} // namespace internal
} // namespace perfetto