blob: 4033ce563ac85f57e9df649e438ef4b5306dc192 [file] [log] [blame]
Wei Wangc80018f2018-08-29 14:04:30 -07001// Copyright 2018 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Bob Badour4375ef62021-02-12 19:51:13 -080015package {
16 default_applicable_licenses: ["external_blktrace_license"],
17}
18
19// Added automatically by a large-scale-change that took the approach of
20// 'apply every license found to every target'. While this makes sure we respect
21// every license restriction, it may not be entirely correct.
22//
23// e.g. GPL in an MIT project might only apply to the contrib/ directory.
24//
25// Please consider splitting the single license below into multiple licenses,
26// taking care not to lose any license_kind information, and overriding the
27// default license using the 'licenses: [...]' property on targets as needed.
28//
29// For unused files, consider creating a 'fileGroup' with "//visibility:private"
30// to attach the license to, and including a comment whether the files may be
31// used in the current project.
32//
33// large-scale-change included anything that looked like it might be a license
34// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
35//
36// Please consider removing redundant or irrelevant files from 'license_text:'.
37// See: http://go/android-license-faq
38license {
39 name: "external_blktrace_license",
40 visibility: [":__subpackages__"],
41 license_kinds: [
42 "SPDX-license-identifier-GPL",
43 "SPDX-license-identifier-GPL-2.0",
44 "SPDX-license-identifier-LGPL",
45 "legacy_unencumbered",
46 ],
47 license_text: [
48 "COPYING",
49 "LICENSE",
50 "NOTICE",
51 ],
52}
53
Wei Wangc80018f2018-08-29 14:04:30 -070054cc_defaults {
55 name: "blktrace_defaults",
56 include_dirs: [
57 "external/blktrace",
58 "external/blktrace/btt",
59 ],
60 cflags: [
61 "-O2",
62 "-g",
63 "-W",
64 "-Wall",
65 "-D_GNU_SOURCE",
66 "-D_LARGEFILE_SOURCE",
67 "-D_FILE_OFFSET_BITS=64",
68 "-Wno-implicit-function-declaration",
69 "-Wno-pointer-arith",
70 "-Wno-unused-function",
71 ],
72}
73
74cc_binary {
75 name: "blkparse",
76 defaults: ["blktrace_defaults"],
77 srcs: [
78 "blkparse.c",
79 "blkparse_fmt.c",
80 "rbtree.c",
81 "act_mask.c",
82 "strverscmp.c",
83 ],
84
85}
86
87cc_binary {
88 name: "blktrace",
89 defaults: ["blktrace_defaults"],
90 srcs: [
91 "blktrace.c",
92 "act_mask.c",
93 ],
94}
95
96cc_binary {
97 name: "verify_blkparse",
98 defaults: ["blktrace_defaults"],
99 srcs: ["verify_blkparse.c"],
100 include_dirs: ["external/blktrace/"],
101}
102
103cc_binary {
104 name: "blkrawverify",
105 defaults: ["blktrace_defaults"],
106 srcs: ["blkrawverify.c"],
107}
108
109cc_binary {
110 name: "blkiomon",
111 defaults: ["blktrace_defaults"],
112 srcs: [
113 "blkiomon.c",
114 "rbtree.c",
115 ],
116}
117
118
119cc_binary {
120 name: "btt",
121 defaults: ["blktrace_defaults"],
122 srcs: [
123 "btt/args.c",
124 "btt/bt_timeline.c",
125 "btt/devmap.c",
126 "btt/devs.c",
127 "btt/dip_rb.c",
128 "btt/iostat.c",
129 "btt/latency.c",
130 "btt/misc.c",
131 "btt/output.c",
132 "btt/proc.c",
133 "btt/seek.c",
134 "btt/trace.c",
135 "btt/trace_complete.c",
136 "btt/trace_im.c",
137 "btt/trace_issue.c",
138 "btt/trace_queue.c",
139 "btt/trace_remap.c",
140 "btt/trace_requeue.c",
141 "rbtree.c",
142 "btt/mmap.c",
143 "btt/trace_plug.c",
144 "btt/bno_dump.c",
145 "btt/unplug_hist.c",
146 "btt/q2d.c",
147 "btt/aqd.c",
148 "btt/plat.c",
149 "btt/p_live.c",
150 "btt/rstats.c",
151 ],
152}