> From: Namhyung Kim [mailto:namhy...@gmail.com] On Behalf Of Namhyung Kim > > On Sat, Aug 29, 2015 at 04:21:48AM +0000, Wang Nan wrote: > > This patch suppresses message output by add_perf_probe_events() and > > del_perf_probe_events() if they are triggered by BPF loading. Before > > this patch, when using 'perf record' with BPF object/source as event > > selector, following message will be output: > > > > Added new event: > > perf_bpf_probe:lock_page_ret (on __lock_page%return) > > You can now use it in all perf tools, such as: > > perf record -e perf_bpf_probe:lock_page_ret -aR sleep 1 > > ... > > Removed event: perf_bpf_probe:lock_page_ret > > > > Which is misleading, especially 'use it in all perf tools' because they > > will be removed after 'pref record' exit. > > > > In this patch, a 'silent' field is appended into probe_conf to control > > output. bpf__{,un}probe() set it to true when calling > > {add,del}_perf_probe_events(). > > I think that printing those messages should be done in cmd_probe() > rather than add/del_perf_probe_events()..
Well... try to cleanup the messages. Thanks! >