linux/tools/lib
Ravi Bangoria a2db71b912 libsubcmd: Fix OPT_CALLBACK_SET()
Any option macro with _SET suffix should set opt->set variable which is
not happening for OPT_CALLBACK_SET(). This is causing issues with perf
record --switch-output-event. Fix that.

Before:

  # ./perf record --overwrite -e sched:*switch,syscalls:sys_enter_mmap \
           --switch-output-event syscalls:sys_enter_mmap
  ^C[ perf record: Woken up 1 times to write data ]
  [ perf record: Captured and wrote 0.297 MB perf.data (657 samples) ]

After:

  $ ./perf record --overwrite -e sched:*switch,syscalls:sys_enter_mmap \
          --switch-output-event syscalls:sys_enter_mmap
  [ perf record: dump data: Woken up 1 times ]
  [ perf record: Dump perf.data.2020061918144542 ]
  [ perf record: dump data: Woken up 1 times ]
  [ perf record: Dump perf.data.2020061918144608 ]
  [ perf record: dump data: Woken up 1 times ]
  [ perf record: Dump perf.data.2020061918144660 ]
  ^C[ perf record: dump data: Woken up 1 times ]
  [ perf record: Dump perf.data.2020061918144784 ]
  [ perf record: Woken up 0 times to write data ]
  [ perf record: Dump perf.data.2020061918144803 ]
  [ perf record: Captured and wrote 0.419 MB perf.data.<timestamp> ]

Fixes: 636eb4d001 ("libsubcmd: Introduce OPT_CALLBACK_SET()")
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lore.kernel.org/lkml/20200619133412.50705-1-ravi.bangoria@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2020-07-17 09:33:06 -03:00
..
api libsymbols kallsyms: Parse using io api 2020-05-05 16:35:32 -03:00
bpf libbpf: Fix libbpf hashmap on (I)LP32 architectures 2020-07-09 19:38:55 -07:00
lockdep .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
perf libperf evlist: Fix a refcount leak 2020-05-05 16:35:29 -03:00
subcmd libsubcmd: Fix OPT_CALLBACK_SET() 2020-07-17 09:33:06 -03:00
symbol libsymbols kallsyms: Move hex2u64 out of header 2020-05-05 16:35:32 -03:00
traceevent tools lib traceevent: Add proper KBUFFER_TYPE_TIME_STAMP handling 2020-07-03 08:45:38 -03:00
argv_split.c tools lib: Move argv_{split,free} from tools/perf/util/ 2019-07-01 22:50:40 -03:00
bitmap.c tools bitmap: Implement bitmap_equal() operation at bitmap API 2020-01-06 11:46:04 -03:00
ctype.c tools perf: Move from sane_ctype.h obtained from git to the Linux's original 2019-06-25 21:02:47 -03:00
find_bit.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
hweight.c
rbtree.c lib/rbtree: fix coding style of assignments 2020-04-07 10:43:43 -07:00
str_error_r.c
string.c tools lib: Fix builds when glibc contains strlcpy() 2020-01-06 11:46:10 -03:00
vsprintf.c perf script: Pad DSO name for --call-trace 2019-05-28 18:37:44 -03:00
zalloc.c tools lib: Adopt zalloc()/zfree() from tools/perf 2019-07-09 10:13:26 -03:00