FYI, we noticed the following commit (built with gcc-7):
commit: 8edf8850d51e911a35b5d7aad4f8604db11abc66 ("perf machine: Use cached rbtrees")
url: https://github.com/0day-ci/linux/commits/Davidlohr-Bueso/tools-perf-Update-rbtree-implementation-and-optimize-users/20171128-120320
in testcase: perf-sanity-tests
with following parameters:
on test machine: qemu-system-x86_64 -enable-kvm -cpu kvm64,+ssse3 -smp 2 -m 8G
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
[ 68.830934] /usr/src/linux-perf-x86_64-rhel-7.2-8edf8850d51e911a35b5d7aad4f8604db11abc66/tools/perf/util/rb_resort.h:148:28: error: passing argument 1 of 'threads_sorted__new' from incompatible pointer type [-Werror=incompatible-pointer-types]
To reproduce:
git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
bin/lkp qemu -k <bzImage> job-script # job-script is attached in this email
Thanks,
Xiaolong
On Thu, 04 Jan 2018, kernel test robot wrote:
>[ 68.830934] /usr/src/linux-perf-x86_64-rhel-7.2-8edf8850d51e911a35b5d7aad4f8604db11abc66/tools/perf/util/rb_resort.h:148:28: error: passing argument 1 of 'threads_sorted__new' from incompatible pointer type [-Werror=incompatible-pointer-types]
I didn't have libaudit so I wasn't building builtin-trace, which obviously needs fixed.
Arnaldo, dunno if you're taking this series, but please let me know if you want a v2 or
you can fold the below fix into this patch.
Thanks,
Davidlohr
diff --git a/tools/perf/util/rb_resort.h b/tools/perf/util/rb_resort.h
index a920f702a74d..aa7a63628d75 100644
--- a/tools/perf/util/rb_resort.h
+++ b/tools/perf/util/rb_resort.h
@@ -140,12 +140,12 @@ struct __name##_sorted *__name = __name##_sorted__new
/* For 'struct intlist' */
#define DECLARE_RESORT_RB_INTLIST(__name, __ilist) \
- DECLARE_RESORT_RB(__name)(&__ilist->rblist.entries, \
+ DECLARE_RESORT_RB(__name)(&__ilist->rblist.entries.rb_root, \
__ilist->rblist.nr_entries)
/* For 'struct machine->threads' */
#define DECLARE_RESORT_RB_MACHINE_THREADS(__name, __machine, hash_bucket) \
- DECLARE_RESORT_RB(__name)(&__machine->threads[hash_bucket].entries, \
+ DECLARE_RESORT_RB(__name)(&__machine->threads[hash_bucket].entries.rb_root,\
__machine->threads[hash_bucket].nr)
#endif /* _PERF_RESORT_RB_H_ */