blob: 7147104b3729a22071360b52fe693a39d8009e32 [file] [log] [blame]
Hector Dearman55ef3e02018-04-11 17:28:55 +01001#!/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
16for 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 Tuccide82dae2018-06-04 16:17:49 +020020 for x in $(find src/traced/probes/ftrace/test/data/*/events -wholename '*/'"$f"'/format' -or -wholename '*/'"$f"'/*/format'); do
Hector Dearman55ef3e02018-04-11 17:28:55 +010021 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
30done | sort