aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Maguire <alan.maguire@oracle.com>2024-04-16 15:37:17 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2024-04-16 17:46:16 -0300
commit43bd3efa85656565129063cdd6dd7499e44a7867 (patch)
tree55f3054c39ebc377a2f5cedd90b44a1a27f5a898
parente78c82db744eab777555d52f20e2cfa701f69695 (diff)
downloadpahole-43bd3efa85656565129063cdd6dd7499e44a7867.tar.gz
pahole: Add reproducible_build to --btf_features
...as a non-standard feature, so it will not be enabled for "--btf_features=all" Signed-off-by: Alan Maguire <alan.maguire@oracle.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Clark Williams <williams@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kui-Feng Lee <kuifeng@fb.com> Cc: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20240416143718.2857981-3-alan.maguire@oracle.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--man-pages/pahole.18
-rw-r--r--pahole.c1
2 files changed, 9 insertions, 0 deletions
diff --git a/man-pages/pahole.1 b/man-pages/pahole.1
index 2c08e973..64de3438 100644
--- a/man-pages/pahole.1
+++ b/man-pages/pahole.1
@@ -310,6 +310,14 @@ Encode BTF using the specified feature list, or specify 'all' for all standard f
in different CUs.
.fi
+Supported non-standard features (not enabled for 'all')
+
+.nf
+ reproducible_build Ensure generated BTF is consistent every time;
+ without this parallel BTF encoding can result in
+ inconsistent BTF ids.
+.fi
+
So for example, specifying \-\-btf_encode=var,enum64 will result in a BTF encoding that (as well as encoding basic BTF information) will contain variables and enum64 values.
.TP
diff --git a/pahole.c b/pahole.c
index 890ef814..38cc6362 100644
--- a/pahole.c
+++ b/pahole.c
@@ -1286,6 +1286,7 @@ struct btf_feature {
BTF_FEATURE(enum64, skip_encoding_btf_enum64, true, true),
BTF_FEATURE(optimized_func, btf_gen_optimized, false, true),
BTF_FEATURE(consistent_func, skip_encoding_btf_inconsistent_proto, false, true),
+ BTF_FEATURE(reproducible_build, reproducible_build, false, false),
};
#define BTF_MAX_FEATURE_STR 1024