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 { |
Colin Cross | 8417233 | 2021-09-14 16:41:33 -0700 | [diff] [blame] | 14 | name: "perfetto_metrics-full", |
| 15 | proto: { |
| 16 | type: "full", |
| 17 | }, |
| 18 | srcs: [ |
| 19 | "protos/perfetto/metrics/perfetto_merged_metrics.proto", |
| 20 | ], |
Lalit Maganti | aa035b2 | 2019-12-20 16:13:09 +0000 | [diff] [blame] | 21 | } |
| 22 | |
Primiano Tucci | 0b651b8 | 2019-06-03 17:16:23 +0100 | [diff] [blame] | 23 | // This sample target shows how to use the perfetto client API from within the |
| 24 | // Android tree. |
| 25 | cc_binary { |
Colin Cross | 8417233 | 2021-09-14 16:41:33 -0700 | [diff] [blame] | 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 | ], |
Primiano Tucci | 0b651b8 | 2019-06-03 17:16:23 +0100 | [diff] [blame] | 45 | } |
Hector Dearman | 92d7d11 | 2019-12-05 15:19:57 +0000 | [diff] [blame] | 46 | |
| 47 | cc_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 | |
| 64 | genrule { |
| 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 | |
| 73 | genrule { |
| 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 | } |
Florian Mayer | 1584c26 | 2021-03-05 13:11:22 +0000 | [diff] [blame] | 81 | |
Kalesh Singh | 8c1eb4b | 2021-03-30 11:59:09 -0400 | [diff] [blame] | 82 | sh_binary { |
| 83 | name: "mm_events", |
| 84 | src: "tools/mm_events", |
| 85 | } |
| 86 | |
Florian Mayer | 1584c26 | 2021-03-05 13:11:22 +0000 | [diff] [blame] | 87 | package { |
| 88 | default_applicable_licenses: ["external_perfetto_license"], |
| 89 | } |
| 90 | |
Paul Thomson | 109ce87 | 2021-04-07 11:41:06 +0100 | [diff] [blame] | 91 | python_library { |
| 92 | name: "perfetto-trace-processor-python", |
| 93 | srcs: [ |
| 94 | ":perfetto-trace-processor-python-srcs", |
| 95 | ], |
| 96 | data: [ |
| 97 | ":perfetto-trace-processor-python-data", |
| 98 | ], |
| 99 | version: { |
| 100 | py2: { |
| 101 | enabled: false, |
| 102 | }, |
| 103 | py3: { |
| 104 | enabled: true, |
| 105 | }, |
| 106 | }, |
| 107 | libs: [ |
| 108 | "libprotobuf-python", |
| 109 | ], |
| 110 | host_supported: true, |
| 111 | } |
| 112 | |
| 113 | filegroup { |
| 114 | name: "perfetto-trace-processor-python-srcs", |
Lalit Maganti | 4c76b4d | 2022-01-11 15:37:41 +0000 | [diff] [blame] | 115 | srcs: ["python/perfetto/trace_processor/*.py"], |
| 116 | path: "python", |
Paul Thomson | 109ce87 | 2021-04-07 11:41:06 +0100 | [diff] [blame] | 117 | } |
| 118 | |
| 119 | filegroup { |
| 120 | name: "perfetto-trace-processor-python-data", |
Lalit Maganti | 4c76b4d | 2022-01-11 15:37:41 +0000 | [diff] [blame] | 121 | srcs: ["python/perfetto/trace_processor/*.descriptor*"], |
| 122 | path: "python", |
Paul Thomson | 109ce87 | 2021-04-07 11:41:06 +0100 | [diff] [blame] | 123 | } |
| 124 | |
Florian Mayer | 1584c26 | 2021-03-05 13:11:22 +0000 | [diff] [blame] | 125 | // Added automatically by a large-scale-change that took the approach of |
| 126 | // 'apply every license found to every target'. While this makes sure we respect |
| 127 | // every license restriction, it may not be entirely correct. |
| 128 | // |
| 129 | // e.g. GPL in an MIT project might only apply to the contrib/ directory. |
| 130 | // |
| 131 | // Please consider splitting the single license below into multiple licenses, |
| 132 | // taking care not to lose any license_kind information, and overriding the |
| 133 | // default license using the 'licenses: [...]' property on targets as needed. |
| 134 | // |
| 135 | // For unused files, consider creating a 'fileGroup' with "//visibility:private" |
| 136 | // to attach the license to, and including a comment whether the files may be |
| 137 | // used in the current project. |
| 138 | // See: http://go/android-license-faq |
| 139 | license { |
| 140 | name: "external_perfetto_license", |
| 141 | visibility: [":__subpackages__"], |
| 142 | license_kinds: [ |
| 143 | "SPDX-license-identifier-Apache-2.0", |
| 144 | "SPDX-license-identifier-BSD", |
| 145 | "SPDX-license-identifier-CC-BY", |
| 146 | ], |
| 147 | license_text: [ |
| 148 | "LICENSE", |
| 149 | ], |
| 150 | } |