1// These targets are appended to the autogenerated Android.bp by tools/gen_android_bp. 2 3java_library_host { 4 name: "perfetto_config-full", 5 proto: { 6 type: "full", 7 }, 8 srcs: [ 9 "protos/perfetto/config/perfetto_config.proto", 10 ], 11} 12 13java_library_host { 14 name: "perfetto_metrics-full", 15 proto: { 16 type: "full", 17 }, 18 srcs: [ 19 "protos/perfetto/metrics/perfetto_merged_metrics.proto", 20 ], 21} 22 23// This sample target shows how to use the perfetto client API from within the 24// Android tree. 25cc_binary { 26 name: "libperfetto_client_example", 27 srcs: [ 28 "test/client_api_example.cc", 29 ], 30 static_libs: [ 31 "libperfetto_client_experimental", 32 "perfetto_trace_protos", 33 ], 34 shared_libs: [ 35 "libprotobuf-cpp-lite", 36 "liblog", 37 ], 38 cflags: [ 39 "-DGOOGLE_PROTOBUF_NO_RTTI", 40 "-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER", 41 ], 42 defaults: [ 43 "perfetto_defaults", 44 ], 45} 46 47cc_library_static { 48 name: "libstatslog_perfetto", 49 generated_sources: ["statslog_perfetto.cpp"], 50 generated_headers: ["statslog_perfetto.h"], 51 cflags: [ 52 "-Wall", 53 "-Werror", 54 ], 55 export_generated_headers: ["statslog_perfetto.h"], 56 shared_libs: [ 57 "libcutils", 58 "liblog", 59 "libstatssocket", 60 "libutils", 61 ], 62} 63 64genrule { 65 name: "statslog_perfetto.h", 66 tools: ["stats-log-api-gen"], 67 cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_perfetto.h --module perfetto --namespace perfetto,android_internal", 68 out: [ 69 "statslog_perfetto.h", 70 ], 71} 72 73genrule { 74 name: "statslog_perfetto.cpp", 75 tools: ["stats-log-api-gen"], 76 cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_perfetto.cpp --module perfetto --namespace perfetto,android_internal --importHeader statslog_perfetto.h", 77 out: [ 78 "statslog_perfetto.cpp", 79 ], 80} 81 82cc_genrule { 83 name: "trace_processor_shell.stripped", 84 device_supported: false, 85 host_supported: true, 86 cmd: "$(location tools/strip_android_host_binary.py) $(in) -o $(out)", 87 enabled: false, 88 compile_multilib: "64", 89 tool_files: [ 90 "tools/strip_android_host_binary.py", 91 ], 92 dist: { 93 targets: [ 94 "sdk_repo", 95 ], 96 }, 97 target: { 98 linux: { 99 out: [ 100 "trace_processor_shell.stripped", 101 ], 102 srcs: [":trace_processor_shell"], 103 enabled: true, 104 }, 105 }, 106} 107