![]() |
|
|||
0001 #!/bin/sh 0002 # SPDX-License-Identifier: LGPL-2.1 0003 0004 [ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/linux/ 0005 0006 printf "static const char *fadvise_advices[] = {\n" 0007 regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+POSIX_FADV_(\w+)[[:space:]]+([[:digit:]]+)[[:space:]]+.*' 0008 0009 egrep $regex ${header_dir}/fadvise.h | \ 0010 sed -r "s/$regex/\2 \1/g" | \ 0011 sort | xargs printf "\t[%s] = \"%s\",\n" | \ 0012 grep -v "[6].*DONTNEED" | grep -v "[7].*NOREUSE" 0013 printf "};\n" 0014 0015 # XXX Fix this properly: 0016 0017 # The grep 6/7 DONTNEED/NOREUSE are a hack to filter out the s/390 oddity See 0018 # tools/include/uapi/linux/fadvise.h for details. 0019 0020 # Probably fix this when generating the string tables per arch so that We can 0021 # reliably process on arch FOO a perf.data file collected by 'perf trace 0022 # record' on arch BAR, e.g. collect on s/390 and process on x86.
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |