Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'perf-tools-fixes-2020-07-19' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into master

Pull perf tooling fixes from Arnaldo Carvalho de Melo:

- Update hashmap.h from libbpf and kvm.h from x86's kernel UAPI.

- Set opt->set in libsubcmd's OPT_CALLBACK_SET(). This fixes
'perf record --switch-output-event event-name' usage"

* tag 'perf-tools-fixes-2020-07-19' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
tools arch kvm: Sync kvm headers with the kernel sources
perf tools: Sync hashmap.h with libbpf's
libsubcmd: Fix OPT_CALLBACK_SET()

+14 -6
+3 -2
tools/arch/x86/include/uapi/asm/kvm.h
··· 408 408 }; 409 409 410 410 struct kvm_vmx_nested_state_hdr { 411 - __u32 flags; 412 411 __u64 vmxon_pa; 413 412 __u64 vmcs12_pa; 414 - __u64 preemption_timer_deadline; 415 413 416 414 struct { 417 415 __u16 flags; 418 416 } smm; 417 + 418 + __u32 flags; 419 + __u64 preemption_timer_deadline; 419 420 }; 420 421 421 422 struct kvm_svm_nested_state_data {
+3
tools/lib/subcmd/parse-options.c
··· 237 237 return err; 238 238 239 239 case OPTION_CALLBACK: 240 + if (opt->set) 241 + *(bool *)opt->set = true; 242 + 240 243 if (unset) 241 244 return (*opt->callback)(opt, NULL, 1) ? (-1) : 0; 242 245 if (opt->flags & PARSE_OPT_NOARG)
+8 -4
tools/perf/util/hashmap.h
··· 11 11 #include <stdbool.h> 12 12 #include <stddef.h> 13 13 #include <limits.h> 14 - #ifndef __WORDSIZE 15 - #define __WORDSIZE (__SIZEOF_LONG__ * 8) 16 - #endif 17 14 18 15 static inline size_t hash_bits(size_t h, int bits) 19 16 { 20 17 /* shuffle bits and return requested number of upper bits */ 21 - return (h * 11400714819323198485llu) >> (__WORDSIZE - bits); 18 + #if (__SIZEOF_SIZE_T__ == __SIZEOF_LONG_LONG__) 19 + /* LP64 case */ 20 + return (h * 11400714819323198485llu) >> (__SIZEOF_LONG_LONG__ * 8 - bits); 21 + #elif (__SIZEOF_SIZE_T__ <= __SIZEOF_LONG__) 22 + return (h * 2654435769lu) >> (__SIZEOF_LONG__ * 8 - bits); 23 + #else 24 + # error "Unsupported size_t size" 25 + #endif 22 26 } 23 27 24 28 typedef size_t (*hashmap_hash_fn)(const void *key, void *ctx);