Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752166AbZLIIoU (ORCPT ); Wed, 9 Dec 2009 03:44:20 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751795AbZLIIoS (ORCPT ); Wed, 9 Dec 2009 03:44:18 -0500 Received: from mx3.mail.elte.hu ([157.181.1.138]:60943 "EHLO mx3.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752131AbZLIIoO (ORCPT ); Wed, 9 Dec 2009 03:44:14 -0500 Date: Wed, 9 Dec 2009 09:43:41 +0100 From: Ingo Molnar To: Masami Hiramatsu Cc: Frederic Weisbecker , lkml , Steven Rostedt , Jim Keniston , Ananth N Mavinakayanahalli , Christoph Hellwig , "Frank Ch. Eigler" , Jason Baron , "K.Prasad" , Peter Zijlstra , Srikar Dronamraju , Arnaldo Carvalho de Melo , systemtap , DLE Subject: Re: [PATCH -tip 0/8] perf-probe updates Message-ID: <20091209084341.GA21333@elte.hu> References: <20091208220232.10142.2643.stgit@dhcp-100-2-132.bos.redhat.com> <20091209072220.GA4328@elte.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091209072220.GA4328@elte.hu> User-Agent: Mutt/1.5.20 (2009-08-17) X-ELTE-SpamScore: 0.0 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=0.0 required=5.9 tests=none autolearn=no SpamAssassin version=3.2.5 _SUMMARY_ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2508 Lines: 71 * Ingo Molnar 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/