mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-26 12:34:41 +08:00
66cb0868b1
commit 7b99f75942
upstream.
v1.25 of pahole supports filtering out functions with multiple inconsistent
function prototypes or optimized-out parameters from the BTF representation.
These present problems because there is no additional info in BTF saying which
inconsistent prototype matches which function instance to help guide attachment,
and functions with optimized-out parameters can lead to incorrect assumptions
about register contents.
So for now, filter out such functions while adding BTF representations for
functions that have "."-suffixes (foo.isra.0) but not optimized-out parameters.
This patch assumes that below linked changes land in pahole for v1.25.
Issues with pahole filtering being too aggressive in removing functions
appear to be resolved now, but CI and further testing will confirm.
Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/r/20230510130241.1696561-1-alan.maguire@oracle.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
[ small context conflict because of not backported --lang_exclude=rust
option, which is not needed in 5.15 ]
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
28 lines
749 B
Bash
Executable File
28 lines
749 B
Bash
Executable File
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
extra_paholeopt=
|
|
|
|
if ! [ -x "$(command -v ${PAHOLE})" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
pahole_ver=$($(dirname $0)/pahole-version.sh ${PAHOLE})
|
|
|
|
if [ "${pahole_ver}" -ge "118" ] && [ "${pahole_ver}" -le "121" ]; then
|
|
# pahole 1.18 through 1.21 can't handle zero-sized per-CPU vars
|
|
extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_vars"
|
|
fi
|
|
if [ "${pahole_ver}" -ge "121" ]; then
|
|
extra_paholeopt="${extra_paholeopt} --btf_gen_floats"
|
|
fi
|
|
|
|
if [ "${pahole_ver}" -ge "124" ]; then
|
|
extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_enum64"
|
|
fi
|
|
if [ "${pahole_ver}" -ge "125" ]; then
|
|
extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_inconsistent_proto --btf_gen_optimized"
|
|
fi
|
|
|
|
echo ${extra_paholeopt}
|