Hector Dearman | 55ef3e0 | 2018-04-11 17:28:55 +0100 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # Copyright (C) 2018 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| 16 | for f in $(cat $1 | grep u:object_r:debugfs_tracing:s0 | grep tracing/events | awk '{ print $3 }' | xargs -n1 basename);do |
| 17 | if [ -f "protos/perfetto/trace/ftrace/$f.proto" ]; then |
| 18 | echo "'protos/perfetto/trace/ftrace/$f.proto',"; |
| 19 | else |
Primiano Tucci | de82dae | 2018-06-04 16:17:49 +0200 | [diff] [blame] | 20 | for x in $(find src/traced/probes/ftrace/test/data/*/events -wholename '*/'"$f"'/format' -or -wholename '*/'"$f"'/*/format'); do |
Hector Dearman | 55ef3e0 | 2018-04-11 17:28:55 +0100 | [diff] [blame] | 21 | event=$(echo $x | awk -F / '{print $(NF - 1)}') |
| 22 | n="protos/perfetto/trace/ftrace/$event.proto"; |
| 23 | if [ -f $n ]; then |
| 24 | echo "'$n'," |
| 25 | else |
| 26 | echo "# MISSING $event" |
| 27 | fi |
| 28 | done |
| 29 | fi |
| 30 | done | sort |