ftrace_procfs: refactor tracefs mount search and add evt->id lookup

traced_perf will want to use tracefs to resolve group/name to an
event id. But it doesn't yet need the full proto translation table.
Including the new function as part of this patch in preparation.

Tested locally, tracing still finds the tracefs under one of the two
paths.

Change-Id: Ifc1529f1166311edfb27dc82fdcbe7d61b3f6a36
diff --git a/BUILD b/BUILD
index 4ad0b3a..74f7957 100644
--- a/BUILD
+++ b/BUILD
@@ -184,6 +184,7 @@
         ":src_traced_probes_filesystem_filesystem",
         ":src_traced_probes_ftrace_format_parser_format_parser",
         ":src_traced_probes_ftrace_ftrace",
+        ":src_traced_probes_ftrace_ftrace_procfs",
         ":src_traced_probes_initial_display_state_initial_display_state",
         ":src_traced_probes_metatrace_metatrace",
         ":src_traced_probes_packages_list_packages_list",
@@ -1366,8 +1367,6 @@
         "src/traced/probes/ftrace/ftrace_data_source.cc",
         "src/traced/probes/ftrace/ftrace_data_source.h",
         "src/traced/probes/ftrace/ftrace_metadata.h",
-        "src/traced/probes/ftrace/ftrace_procfs.cc",
-        "src/traced/probes/ftrace/ftrace_procfs.h",
         "src/traced/probes/ftrace/ftrace_stats.cc",
         "src/traced/probes/ftrace/ftrace_stats.h",
         "src/traced/probes/ftrace/printk_formats_parser.cc",
@@ -1377,6 +1376,15 @@
     ],
 )
 
+# GN target: //src/traced/probes/ftrace:ftrace_procfs
+filegroup(
+    name = "src_traced_probes_ftrace_ftrace_procfs",
+    srcs = [
+        "src/traced/probes/ftrace/ftrace_procfs.cc",
+        "src/traced/probes/ftrace/ftrace_procfs.h",
+    ],
+)
+
 # GN target: //src/traced/probes/initial_display_state:initial_display_state
 filegroup(
     name = "src_traced_probes_initial_display_state_initial_display_state",