Support to enable profiling dynamically.
* Add an additonal reserved method setHALInstrumentation to
enable/disable instrumentation during the hal execution.
Test: make hidl-gen
Change-Id: Iaf20e3f798a51b111bffd2e7294973bce0cabf9e
diff --git a/generateCpp.cpp b/generateCpp.cpp
index a4af202..e3ce85c 100644
--- a/generateCpp.cpp
+++ b/generateCpp.cpp
@@ -537,6 +537,14 @@
out << " {\n";
out.indent();
+ if (method->isHidlReserved()
+ && method->overridesCppImpl(IMPL_PASSTHROUGH)) {
+ method->cppImpl(IMPL_PASSTHROUGH, out);
+ out.unindent();
+ out << "}\n\n";
+ return OK;
+ }
+
const bool returnsValue = !method->results().empty();
const TypedVar *elidedReturn = method->canElideCallback();