Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl

Issue 1409223004: mandoline: Add automatic tracing at mojo call sites. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Safety rebase to ToT Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl
diff --git a/third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl b/third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl
index a06d8496de7b5d185444e28b1ce41438c9520a57..15464ceea621d4e2a02910c563c63feba75b35fb 100644
--- a/third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl
+++ b/third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl
@@ -194,6 +194,7 @@ bool {{class_name}}Stub::Accept(mojo::Message* message) {
{{alloc_params(method.param_struct)|indent(4)}}
// A null |sink_| means no implementation was bound.
assert(sink_);
+ TRACE_EVENT0("mojom", "{{class_name}}::{{method.name}}");
sink_->{{method.name}}({{pass_params(method.parameters)}});
return true;
{%- else %}
@@ -228,6 +229,7 @@ bool {{class_name}}Stub::AcceptWithResponder(
{{alloc_params(method.param_struct)|indent(4)}}
// A null |sink_| means no implementation was bound.
assert(sink_);
+ TRACE_EVENT0("mojom", "{{class_name}}::{{method.name}}");
sink_->{{method.name}}(
{%- if method.parameters -%}{{pass_params(method.parameters)}}, {% endif -%}callback);
return true;

Powered by Google App Engine
This is Rietveld 408576698