Lalit Maganti | 83e712a | 2018-02-05 15:48:00 +0000 | [diff] [blame] | 1 | // These targets are appended to the autogenerated Android.bp by tools/gen_android_bp. |
Primiano Tucci | f955198 | 2019-09-06 13:48:01 +0100 | [diff] [blame] | 2 | |
Lalit Maganti | f5d666d | 2018-10-23 14:23:24 +0100 | [diff] [blame] | 3 | java_library_host { |
Colin Cross | 8417233 | 2021-09-14 16:41:33 -0700 | [diff] [blame] | 4 | name: "perfetto_config-full", |
| 5 | proto: { |
| 6 | type: "full", |
| 7 | }, |
| 8 | srcs: [ |
| 9 | "protos/perfetto/config/perfetto_config.proto", |
| 10 | ], |
Lalit Maganti | 6820cb6 | 2018-10-05 13:34:22 +0100 | [diff] [blame] | 11 | } |
Primiano Tucci | 0b651b8 | 2019-06-03 17:16:23 +0100 | [diff] [blame] | 12 | |
Lalit Maganti | aa035b2 | 2019-12-20 16:13:09 +0000 | [diff] [blame] | 13 | java_library_host { |
Julien Desprez | 0385880 | 2022-07-26 16:15:12 -0700 | [diff] [blame] | 14 | name: "perfetto_trace-full", |
| 15 | proto: { |
| 16 | type: "full", |
| 17 | }, |
| 18 | srcs: [ |
| 19 | "protos/perfetto/trace/perfetto_trace.proto", |
| 20 | ], |
| 21 | } |
| 22 | |
| 23 | java_library_host { |
Colin Cross | 8417233 | 2021-09-14 16:41:33 -0700 | [diff] [blame] | 24 | name: "perfetto_metrics-full", |
| 25 | proto: { |
| 26 | type: "full", |
| 27 | }, |
| 28 | srcs: [ |
| 29 | "protos/perfetto/metrics/perfetto_merged_metrics.proto", |
| 30 | ], |
Lalit Maganti | aa035b2 | 2019-12-20 16:13:09 +0000 | [diff] [blame] | 31 | } |
| 32 | |
Primiano Tucci | 0b651b8 | 2019-06-03 17:16:23 +0100 | [diff] [blame] | 33 | // This sample target shows how to use the perfetto client API from within the |
| 34 | // Android tree. |
| 35 | cc_binary { |
Colin Cross | 8417233 | 2021-09-14 16:41:33 -0700 | [diff] [blame] | 36 | name: "libperfetto_client_example", |
| 37 | srcs: [ |
| 38 | "test/client_api_example.cc", |
| 39 | ], |
| 40 | static_libs: [ |
| 41 | "libperfetto_client_experimental", |
| 42 | "perfetto_trace_protos", |
| 43 | ], |
| 44 | shared_libs: [ |
| 45 | "libprotobuf-cpp-lite", |
| 46 | "liblog", |
| 47 | ], |
| 48 | cflags: [ |
| 49 | "-DGOOGLE_PROTOBUF_NO_RTTI", |
| 50 | "-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER", |
| 51 | ], |
| 52 | defaults: [ |
| 53 | "perfetto_defaults", |
| 54 | ], |
Primiano Tucci | 0b651b8 | 2019-06-03 17:16:23 +0100 | [diff] [blame] | 55 | } |
Hector Dearman | 92d7d11 | 2019-12-05 15:19:57 +0000 | [diff] [blame] | 56 | |
| 57 | cc_library_static { |
| 58 | name: "libstatslog_perfetto", |
| 59 | generated_sources: ["statslog_perfetto.cpp"], |
| 60 | generated_headers: ["statslog_perfetto.h"], |
| 61 | cflags: [ |
| 62 | "-Wall", |
| 63 | "-Werror", |
| 64 | ], |
| 65 | export_generated_headers: ["statslog_perfetto.h"], |
| 66 | shared_libs: [ |
| 67 | "libcutils", |
| 68 | "liblog", |
| 69 | "libstatssocket", |
| 70 | "libutils", |
| 71 | ], |
| 72 | } |
| 73 | |
| 74 | genrule { |
| 75 | name: "statslog_perfetto.h", |
| 76 | tools: ["stats-log-api-gen"], |
| 77 | cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_perfetto.h --module perfetto --namespace perfetto,android_internal", |
| 78 | out: [ |
| 79 | "statslog_perfetto.h", |
| 80 | ], |
| 81 | } |
| 82 | |
| 83 | genrule { |
| 84 | name: "statslog_perfetto.cpp", |
| 85 | tools: ["stats-log-api-gen"], |
| 86 | cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_perfetto.cpp --module perfetto --namespace perfetto,android_internal --importHeader statslog_perfetto.h", |
| 87 | out: [ |
| 88 | "statslog_perfetto.cpp", |
| 89 | ], |
| 90 | } |
Florian Mayer | 1584c26 | 2021-03-05 13:11:22 +0000 | [diff] [blame] | 91 | |
Kalesh Singh | 8c1eb4b | 2021-03-30 11:59:09 -0400 | [diff] [blame] | 92 | sh_binary { |
| 93 | name: "mm_events", |
| 94 | src: "tools/mm_events", |
| 95 | } |
| 96 | |
Florian Mayer | 1584c26 | 2021-03-05 13:11:22 +0000 | [diff] [blame] | 97 | package { |
| 98 | default_applicable_licenses: ["external_perfetto_license"], |
| 99 | } |
| 100 | |
Paul Thomson | 109ce87 | 2021-04-07 11:41:06 +0100 | [diff] [blame] | 101 | python_library { |
| 102 | name: "perfetto-trace-processor-python", |
| 103 | srcs: [ |
| 104 | ":perfetto-trace-processor-python-srcs", |
Tomas Urbonaitis | 6373547 | 2022-08-11 15:18:06 +0200 | [diff] [blame^] | 105 | ":perfetto-trace-uri-resolver-python-srcs", |
Paul Thomson | 109ce87 | 2021-04-07 11:41:06 +0100 | [diff] [blame] | 106 | ], |
| 107 | data: [ |
| 108 | ":perfetto-trace-processor-python-data", |
| 109 | ], |
| 110 | version: { |
| 111 | py2: { |
| 112 | enabled: false, |
| 113 | }, |
| 114 | py3: { |
| 115 | enabled: true, |
| 116 | }, |
| 117 | }, |
| 118 | libs: [ |
| 119 | "libprotobuf-python", |
| 120 | ], |
| 121 | host_supported: true, |
| 122 | } |
| 123 | |
| 124 | filegroup { |
Tomas Urbonaitis | 6373547 | 2022-08-11 15:18:06 +0200 | [diff] [blame^] | 125 | name: "perfetto-trace-uri-resolver-python-srcs", |
| 126 | srcs: ["python/perfetto/trace_uri_resolver/*.py"], |
| 127 | path: "python", |
| 128 | } |
| 129 | |
| 130 | filegroup { |
Paul Thomson | 109ce87 | 2021-04-07 11:41:06 +0100 | [diff] [blame] | 131 | name: "perfetto-trace-processor-python-srcs", |
Lalit Maganti | 4c76b4d | 2022-01-11 15:37:41 +0000 | [diff] [blame] | 132 | srcs: ["python/perfetto/trace_processor/*.py"], |
| 133 | path: "python", |
Paul Thomson | 109ce87 | 2021-04-07 11:41:06 +0100 | [diff] [blame] | 134 | } |
| 135 | |
| 136 | filegroup { |
| 137 | name: "perfetto-trace-processor-python-data", |
Lalit Maganti | 4c76b4d | 2022-01-11 15:37:41 +0000 | [diff] [blame] | 138 | srcs: ["python/perfetto/trace_processor/*.descriptor*"], |
| 139 | path: "python", |
Paul Thomson | 109ce87 | 2021-04-07 11:41:06 +0100 | [diff] [blame] | 140 | } |
| 141 | |
Florian Mayer | 1584c26 | 2021-03-05 13:11:22 +0000 | [diff] [blame] | 142 | // Added automatically by a large-scale-change that took the approach of |
| 143 | // 'apply every license found to every target'. While this makes sure we respect |
| 144 | // every license restriction, it may not be entirely correct. |
| 145 | // |
| 146 | // e.g. GPL in an MIT project might only apply to the contrib/ directory. |
| 147 | // |
| 148 | // Please consider splitting the single license below into multiple licenses, |
| 149 | // taking care not to lose any license_kind information, and overriding the |
| 150 | // default license using the 'licenses: [...]' property on targets as needed. |
| 151 | // |
| 152 | // For unused files, consider creating a 'fileGroup' with "//visibility:private" |
| 153 | // to attach the license to, and including a comment whether the files may be |
| 154 | // used in the current project. |
| 155 | // See: http://go/android-license-faq |
| 156 | license { |
| 157 | name: "external_perfetto_license", |
| 158 | visibility: [":__subpackages__"], |
| 159 | license_kinds: [ |
| 160 | "SPDX-license-identifier-Apache-2.0", |
| 161 | "SPDX-license-identifier-BSD", |
| 162 | "SPDX-license-identifier-CC-BY", |
| 163 | ], |
| 164 | license_text: [ |
| 165 | "LICENSE", |
| 166 | ], |
| 167 | } |