|
From: Ingo M. <mi...@el...> - 2009-12-09 08:44:13
|
* Ingo Molnar <mi...@el...> wrote: > One hickup is that -d/--del does not appear to be working yet: > > # perf probe -l > probe:schedule (on schedule) > > # perf probe -d probe:schedule > Fatal: Failed to write event: Invalid argument Ah, that was with an older kernel - a freshly booted kernel with delete-probe syntax worked fine. There's another small hickup i had - when i typoed 'perf probe -', it gave me: # perf probe - No dwarf info found in the vmlinux - please rebuild with CONFIG_DEBUG_INFO. An error occurred in debuginfo analysis. Try to use symbols. Fatal: Failed to write event: Invalid argument Similar thing happens if i try to probe a non-existent symbol: # perf probe test No dwarf info found in the vmlinux - please rebuild with CONFIG_DEBUG_INFO. An error occurred in debuginfo analysis. Try to use symbols. Fatal: Failed to write event: Invalid argument I think we should print something more helpful, such as: # perf probe test Fatal: Kernel symbol 'test' not found - probe not added. the debuginfo printout is not helpful in this case - we should fall back to symbols silently, unless the nature of the error indicates that we fail _because_ there's no debuginfo. Here the failure was because the symbol does not exist. There's similar problems in most other failure cases. Trying to remove a non-existent probe gives: # perf probe -d test Warning: event "probe:test" is not found. It should say something like: # perf probe -d test Info: event "probe:test" does not exist, could not remove it. Also, it's possible to add multiple probes to the same function, using 'perf probe schedule' + 'perf probe schedule', etc. While in general it makes sense to allow it, by default we should refuse the second, identical probe on the symbol - and add a -f/--force option to force duplicate probes. I.e. the second probe should print: # perf probe schedule Info: event "probe:schedule" already exists. (Use -f to force a duplicate.) etc. Please try out various sensible and also less sensible options of this tool and try to make it break - and see whether the behavior is intuitive and obvious to users - whether the messages are consistent, etc. etc. Ingo |