drm/nouveau: consume the return of large GSP message
[drm/drm-misc.git] / tools / perf / trace / beauty / sync_file_range.sh
blobb1084c4cab636b52db31d430cad309a78ff2e324
1 #!/bin/sh
2 # SPDX-License-Identifier: LGPL-2.1
4 if [ $# -ne 1 ] ; then
5 linux_header_dir=tools/perf/trace/beauty/include/uapi/linux/
6 else
7 linux_header_dir=$1
8 fi
10 linux_fs=${linux_header_dir}/fs.h
12 printf "static const char *sync_file_range_flags[] = {\n"
13 regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+SYNC_FILE_RANGE_([[:alnum:]_]+)[[:space:]]+([[:xdigit:]]+)[[:space:]]*.*'
14 grep -E $regex ${linux_fs} | \
15 sed -r "s/$regex/\2 \1/g" | \
16 xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n"
17 printf "};\n"