Merge "Update profiler generator in respect to HidlInstrumentor."
diff --git a/sysfuzzer/vtscompiler/code_gen/profiler/HalHidlProfilerCodeGen.cpp b/sysfuzzer/vtscompiler/code_gen/profiler/HalHidlProfilerCodeGen.cpp
index d79cd53..3891395 100644
--- a/sysfuzzer/vtscompiler/code_gen/profiler/HalHidlProfilerCodeGen.cpp
+++ b/sysfuzzer/vtscompiler/code_gen/profiler/HalHidlProfilerCodeGen.cpp
@@ -140,7 +140,7 @@
   out << "FunctionSpecificationMessage msg;\n";
   out << "switch (event) {\n";
   out.indent();
-  out << "case SERVER_API_ENTRY:\n";
+  out << "case HidlInstrumentor::SERVER_API_ENTRY:\n";
   out << "{\n";
   out.indent();
   ComponentSpecificationMessage message;
@@ -159,7 +159,7 @@
   out << "break;\n";
   out.unindent();
   out << "}\n";
-  out << "case SERVER_API_EXIT:\n";
+  out << "case HidlInstrumentor::SERVER_API_EXIT:\n";
   out << "{\n";
   out.indent();
   for (int i = 0; i < method.return_type_hidl().size(); i++) {
diff --git a/sysfuzzer/vtscompiler/code_gen/profiler/ProfilerCodeGenBase.cpp b/sysfuzzer/vtscompiler/code_gen/profiler/ProfilerCodeGenBase.cpp
index 8251ab0..f14ada6 100644
--- a/sysfuzzer/vtscompiler/code_gen/profiler/ProfilerCodeGenBase.cpp
+++ b/sysfuzzer/vtscompiler/code_gen/profiler/ProfilerCodeGenBase.cpp
@@ -60,7 +60,7 @@
     out << "\nvoid HIDL_INSTRUMENTATION_FUNCTION(\n";
     out.indent();
     out.indent();
-    out << "InstrumentationEvent event,\n";
+    out << "HidlInstrumentor::InstrumentationEvent event,\n";
     out << "const char* package,\n";
     out << "const char* version,\n";
     out << "const char* interface,\n";
@@ -102,7 +102,7 @@
     out << "\nvoid HIDL_INSTRUMENTATION_FUNCTION(\n";
     out.indent();
     out.indent();
-    out << "InstrumentationEvent event,\n";
+    out << "HidlInstrumentor::InstrumentationEvent event,\n";
     out << "const char* package,\n";
     out << "const char* version,\n";
     out << "const char* interface,\n";
diff --git a/sysfuzzer/vtscompiler/test/golden/PROFILER/Nfc.profiler.cpp b/sysfuzzer/vtscompiler/test/golden/PROFILER/Nfc.profiler.cpp
index 3f39c87..8c212d9 100644
--- a/sysfuzzer/vtscompiler/test/golden/PROFILER/Nfc.profiler.cpp
+++ b/sysfuzzer/vtscompiler/test/golden/PROFILER/Nfc.profiler.cpp
@@ -11,7 +11,7 @@
 
 
 void HIDL_INSTRUMENTATION_FUNCTION(
-        InstrumentationEvent event,
+        HidlInstrumentor::InstrumentationEvent event,
         const char* package,
         const char* version,
         const char* interface,
@@ -38,14 +38,14 @@
     if (strcmp(method, "open") == 0) {
         FunctionSpecificationMessage msg;
         switch (event) {
-            case SERVER_API_ENTRY:
+            case HidlInstrumentor::SERVER_API_ENTRY:
             {
                 auto *arg_0 = msg.add_arg();
                 INfcClientCallback *arg_val_0 = reinterpret_cast<INfcClientCallback*> ((*args)[0]);
                 arg_0->set_type(TYPE_HIDL_CALLBACK);
                 break;
             }
-            case SERVER_API_EXIT:
+            case HidlInstrumentor::SERVER_API_EXIT:
             {
                 auto *result_0 = msg.add_return_type_hidl();
                 int32_t *result_val_0 = reinterpret_cast<int32_t*> ((*args)[0]);
@@ -64,7 +64,7 @@
     if (strcmp(method, "write") == 0) {
         FunctionSpecificationMessage msg;
         switch (event) {
-            case SERVER_API_ENTRY:
+            case HidlInstrumentor::SERVER_API_ENTRY:
             {
                 auto *arg_0 = msg.add_arg();
                 hidl_vec<uint8_t> *arg_val_0 = reinterpret_cast<hidl_vec<uint8_t>*> ((*args)[0]);
@@ -75,7 +75,7 @@
                 }
                 break;
             }
-            case SERVER_API_EXIT:
+            case HidlInstrumentor::SERVER_API_EXIT:
             {
                 auto *result_0 = msg.add_return_type_hidl();
                 int32_t *result_val_0 = reinterpret_cast<int32_t*> ((*args)[0]);
@@ -94,7 +94,7 @@
     if (strcmp(method, "coreInitialized") == 0) {
         FunctionSpecificationMessage msg;
         switch (event) {
-            case SERVER_API_ENTRY:
+            case HidlInstrumentor::SERVER_API_ENTRY:
             {
                 auto *arg_0 = msg.add_arg();
                 hidl_vec<uint8_t> *arg_val_0 = reinterpret_cast<hidl_vec<uint8_t>*> ((*args)[0]);
@@ -105,7 +105,7 @@
                 }
                 break;
             }
-            case SERVER_API_EXIT:
+            case HidlInstrumentor::SERVER_API_EXIT:
             {
                 auto *result_0 = msg.add_return_type_hidl();
                 int32_t *result_val_0 = reinterpret_cast<int32_t*> ((*args)[0]);
@@ -124,11 +124,11 @@
     if (strcmp(method, "prediscover") == 0) {
         FunctionSpecificationMessage msg;
         switch (event) {
-            case SERVER_API_ENTRY:
+            case HidlInstrumentor::SERVER_API_ENTRY:
             {
                 break;
             }
-            case SERVER_API_EXIT:
+            case HidlInstrumentor::SERVER_API_EXIT:
             {
                 auto *result_0 = msg.add_return_type_hidl();
                 int32_t *result_val_0 = reinterpret_cast<int32_t*> ((*args)[0]);
@@ -147,11 +147,11 @@
     if (strcmp(method, "close") == 0) {
         FunctionSpecificationMessage msg;
         switch (event) {
-            case SERVER_API_ENTRY:
+            case HidlInstrumentor::SERVER_API_ENTRY:
             {
                 break;
             }
-            case SERVER_API_EXIT:
+            case HidlInstrumentor::SERVER_API_EXIT:
             {
                 auto *result_0 = msg.add_return_type_hidl();
                 int32_t *result_val_0 = reinterpret_cast<int32_t*> ((*args)[0]);
@@ -170,11 +170,11 @@
     if (strcmp(method, "controlGranted") == 0) {
         FunctionSpecificationMessage msg;
         switch (event) {
-            case SERVER_API_ENTRY:
+            case HidlInstrumentor::SERVER_API_ENTRY:
             {
                 break;
             }
-            case SERVER_API_EXIT:
+            case HidlInstrumentor::SERVER_API_EXIT:
             {
                 auto *result_0 = msg.add_return_type_hidl();
                 int32_t *result_val_0 = reinterpret_cast<int32_t*> ((*args)[0]);
@@ -193,11 +193,11 @@
     if (strcmp(method, "powerCycle") == 0) {
         FunctionSpecificationMessage msg;
         switch (event) {
-            case SERVER_API_ENTRY:
+            case HidlInstrumentor::SERVER_API_ENTRY:
             {
                 break;
             }
-            case SERVER_API_EXIT:
+            case HidlInstrumentor::SERVER_API_EXIT:
             {
                 auto *result_0 = msg.add_return_type_hidl();
                 int32_t *result_val_0 = reinterpret_cast<int32_t*> ((*args)[0]);
diff --git a/sysfuzzer/vtscompiler/test/golden/PROFILER/NfcClientCallback.profiler.cpp b/sysfuzzer/vtscompiler/test/golden/PROFILER/NfcClientCallback.profiler.cpp
index 79606fc..bf4c19d 100644
--- a/sysfuzzer/vtscompiler/test/golden/PROFILER/NfcClientCallback.profiler.cpp
+++ b/sysfuzzer/vtscompiler/test/golden/PROFILER/NfcClientCallback.profiler.cpp
@@ -11,7 +11,7 @@
 
 
 void HIDL_INSTRUMENTATION_FUNCTION(
-        InstrumentationEvent event,
+        HidlInstrumentor::InstrumentationEvent event,
         const char* package,
         const char* version,
         const char* interface,
@@ -38,7 +38,7 @@
     if (strcmp(method, "sendEvent") == 0) {
         FunctionSpecificationMessage msg;
         switch (event) {
-            case SERVER_API_ENTRY:
+            case HidlInstrumentor::SERVER_API_ENTRY:
             {
                 auto *arg_0 = msg.add_arg();
                 NfcEvent *arg_val_0 = reinterpret_cast<NfcEvent*> ((*args)[0]);
@@ -50,7 +50,7 @@
                 profile__NfcStatus(arg_1, (*arg_val_1));
                 break;
             }
-            case SERVER_API_EXIT:
+            case HidlInstrumentor::SERVER_API_EXIT:
             {
                 break;
             }
@@ -65,7 +65,7 @@
     if (strcmp(method, "sendData") == 0) {
         FunctionSpecificationMessage msg;
         switch (event) {
-            case SERVER_API_ENTRY:
+            case HidlInstrumentor::SERVER_API_ENTRY:
             {
                 auto *arg_0 = msg.add_arg();
                 hidl_vec<uint8_t> *arg_val_0 = reinterpret_cast<hidl_vec<uint8_t>*> ((*args)[0]);
@@ -76,7 +76,7 @@
                 }
                 break;
             }
-            case SERVER_API_EXIT:
+            case HidlInstrumentor::SERVER_API_EXIT:
             {
                 break;
             }
diff --git a/sysfuzzer/vtscompiler/test/golden/PROFILER/hardware/interfaces/nfc/1.0/vts/Nfc.vts.h b/sysfuzzer/vtscompiler/test/golden/PROFILER/hardware/interfaces/nfc/1.0/vts/Nfc.vts.h
index 81f5e4c..9188a53 100644
--- a/sysfuzzer/vtscompiler/test/golden/PROFILER/hardware/interfaces/nfc/1.0/vts/Nfc.vts.h
+++ b/sysfuzzer/vtscompiler/test/golden/PROFILER/hardware/interfaces/nfc/1.0/vts/Nfc.vts.h
@@ -22,7 +22,7 @@
 extern "C" {
 
     void HIDL_INSTRUMENTATION_FUNCTION(
-            InstrumentationEvent event,
+            HidlInstrumentor::InstrumentationEvent event,
             const char* package,
             const char* version,
             const char* interface,
diff --git a/sysfuzzer/vtscompiler/test/golden/PROFILER/hardware/interfaces/nfc/1.0/vts/NfcClientCallback.vts.h b/sysfuzzer/vtscompiler/test/golden/PROFILER/hardware/interfaces/nfc/1.0/vts/NfcClientCallback.vts.h
index 003c00e..479880e 100644
--- a/sysfuzzer/vtscompiler/test/golden/PROFILER/hardware/interfaces/nfc/1.0/vts/NfcClientCallback.vts.h
+++ b/sysfuzzer/vtscompiler/test/golden/PROFILER/hardware/interfaces/nfc/1.0/vts/NfcClientCallback.vts.h
@@ -21,7 +21,7 @@
 extern "C" {
 
     void HIDL_INSTRUMENTATION_FUNCTION(
-            InstrumentationEvent event,
+            HidlInstrumentor::InstrumentationEvent event,
             const char* package,
             const char* version,
             const char* interface,