Upload app_versioncode to pprof and firefox

Upload to pprof as a comment.

Firefox Profiler format seems to have a build ID field that fits well.

Bug: 207573616
Change-Id: Ia974f924f6c8c476b110e9317be88b04079e003a
diff --git a/simpleperf/scripts/gecko_profile_generator.py b/simpleperf/scripts/gecko_profile_generator.py
index e7b0046..dac1041 100755
--- a/simpleperf/scripts/gecko_profile_generator.py
+++ b/simpleperf/scripts/gecko_profile_generator.py
@@ -475,6 +475,7 @@
         "markerSchema": [],
         "abi": arch,
         "oscpu": meta_info.get("android_build_fingerprint"),
+        "appBuildID": meta_info.get("app_versioncode"),
     }
 
     # Schema:
diff --git a/simpleperf/scripts/pprof_proto_generator.py b/simpleperf/scripts/pprof_proto_generator.py
index a22e424..b2ca090 100755
--- a/simpleperf/scripts/pprof_proto_generator.py
+++ b/simpleperf/scripts/pprof_proto_generator.py
@@ -310,6 +310,9 @@
             "Converted to pprof with:\n" + " ".join(sys.argv),
             "Architecture:\n" + self.lib.GetArch(),
         ]
+        meta_info = self.lib.MetaInfo()
+        if "app_versioncode" in meta_info:
+          comments.append("App Version Code:\n" + meta_info["app_versioncode"])
         for comment in comments:
             self.profile.comment.append(self.get_string_id(comment))
 
diff --git a/simpleperf/scripts/test/script_testdata/perf_with_interpreter_frames.gecko.json b/simpleperf/scripts/test/script_testdata/perf_with_interpreter_frames.gecko.json
index 9959265..264dc44 100644
--- a/simpleperf/scripts/test/script_testdata/perf_with_interpreter_frames.gecko.json
+++ b/simpleperf/scripts/test/script_testdata/perf_with_interpreter_frames.gecko.json
@@ -2,6 +2,7 @@
   "libs": [],
   "meta": {
     "abi": "aarch64",
+    "appBuildID": null,
     "asyncstack": 1,
     "categories": [
       {
diff --git a/simpleperf/scripts/test/script_testdata/perf_with_jit_symbol.gecko.json b/simpleperf/scripts/test/script_testdata/perf_with_jit_symbol.gecko.json
index bb8940a..3988fef 100644
--- a/simpleperf/scripts/test/script_testdata/perf_with_jit_symbol.gecko.json
+++ b/simpleperf/scripts/test/script_testdata/perf_with_jit_symbol.gecko.json
@@ -2,6 +2,7 @@
   "libs": [],
   "meta": {
     "abi": "aarch64",
+    "appBuildID": null,
     "asyncstack": 1,
     "categories": [
       {
diff --git a/simpleperf/scripts/test/script_testdata/perf_with_tracepoint_event.gecko.json b/simpleperf/scripts/test/script_testdata/perf_with_tracepoint_event.gecko.json
index 2f5a926..2072b53 100644
--- a/simpleperf/scripts/test/script_testdata/perf_with_tracepoint_event.gecko.json
+++ b/simpleperf/scripts/test/script_testdata/perf_with_tracepoint_event.gecko.json
@@ -2,6 +2,7 @@
   "libs": [],
   "meta": {
     "abi": "aarch64",
+    "appBuildID": null,
     "asyncstack": 1,
     "categories": [
       {