19741e07eSJiri Olsa#!/bin/sh 29741e07eSJiri Olsa# SPDX-License-Identifier: GPL-2.0 39741e07eSJiri Olsa 49741e07eSJiri Olsaextra_paholeopt= 59741e07eSJiri Olsa 69741e07eSJiri Olsaif ! [ -x "$(command -v ${PAHOLE})" ]; then 7fc02cb2bSLinus Torvalds exit 0 89741e07eSJiri Olsafi 99741e07eSJiri Olsa 102d6c9810SNathan Chancellorpahole_ver=$($(dirname $0)/pahole-version.sh ${PAHOLE}) 119741e07eSJiri Olsa 129741e07eSJiri Olsaif [ "${pahole_ver}" -ge "118" ] && [ "${pahole_ver}" -le "121" ]; then 139741e07eSJiri Olsa # pahole 1.18 through 1.21 can't handle zero-sized per-CPU vars 149741e07eSJiri Olsa extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_vars" 159741e07eSJiri Olsafi 169741e07eSJiri Olsaif [ "${pahole_ver}" -ge "121" ]; then 179741e07eSJiri Olsa extra_paholeopt="${extra_paholeopt} --btf_gen_floats" 189741e07eSJiri Olsafi 19b4f72786SKui-Feng Leeif [ "${pahole_ver}" -ge "122" ]; then 20b4f72786SKui-Feng Lee extra_paholeopt="${extra_paholeopt} -j" 21b4f72786SKui-Feng Leefi 22c1177979SMartin Rodriguez Reboredoif [ "${pahole_ver}" -ge "124" ]; then 23c1177979SMartin Rodriguez Reboredo # see PAHOLE_HAS_LANG_EXCLUDE 24c1177979SMartin Rodriguez Reboredo extra_paholeopt="${extra_paholeopt} --lang_exclude=rust" 25c1177979SMartin Rodriguez Reboredofi 26*7b99f759SAlan Maguireif [ "${pahole_ver}" -ge "125" ]; then 27*7b99f759SAlan Maguire extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_inconsistent_proto --btf_gen_optimized" 28*7b99f759SAlan Maguirefi 299741e07eSJiri Olsa 309741e07eSJiri Olsaecho ${extra_paholeopt} 31