aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/flamegraph-record
diff options
context:
space:
mode:
authorNathan Chancellor <[email protected]>2022-03-22 14:43:23 -0700
committerLinus Torvalds <[email protected]>2022-03-22 15:57:06 -0700
commita4812d47deff0642b3315f0528d579f0a99c45c2 (patch)
tree3d5e28a075dbaa07321f8f8f5e91d0389f3857ee /tools/perf/scripts/python/bin/flamegraph-record
parentb3d40a2b6d10c9d0424d2b398bf962fb6adad87e (diff)
mm/page_alloc: mark pagesets as __maybe_unused
Commit 9983a9d577db ("locking/local_lock: Make the empty local_lock_*() function a macro.") in the -tip tree converted the local_lock_*() functions into macros, which causes a warning with clang with CONFIG_PREEMPT_RT=n + CONFIG_DEBUG_LOCK_ALLOC=n: mm/page_alloc.c:131:40: error: variable 'pagesets' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] static DEFINE_PER_CPU(struct pagesets, pagesets) = { ^ 1 error generated. Prior to that change, clang was not able to tell that pagesets was unused in this configuration because it does not perform cross function analysis in the frontend. After that change, it sees that the macros just do a typecheck on the lock member of pagesets, which is evaluated at compile time (so the variable is technically "used"), meaning the variable is not needed in the final assembly, as the warning states. Mark the variable as __maybe_unused to make it clear to clang that this is expected in this configuration so there is no more warning. Link: https://github.com/ClangBuiltLinux/linux/issues/1593 Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Nathan Chancellor <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Reported-by: "kernelci.org bot" <[email protected]> Cc: Sebastian Andrzej Siewior <[email protected]> Cc: Peter Zijlstra <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/flamegraph-record')
0 files changed, 0 insertions, 0 deletions