From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754446AbbDRUnR (ORCPT ); Sat, 18 Apr 2015 16:43:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42684 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753604AbbDRUnP (ORCPT ); Sat, 18 Apr 2015 16:43:15 -0400 Date: Sat, 18 Apr 2015 22:42:58 +0200 From: Jiri Olsa To: Ingo Molnar Cc: Jiri Olsa , Arnaldo Carvalho de Melo , lkml , Peter Zijlstra , Paul Mackerras , David Ahern , Namhyung Kim Subject: Re: [RFC 0/6] perf tools: Report event parsing errors Message-ID: <20150418204258.GA26943@krava.redhat.com> References: <1429377946-2147-1-git-send-email-jolsa@kernel.org> <20150418173927.GA5897@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150418173927.GA5897@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 18, 2015 at 07:39:27PM +0200, Ingo Molnar wrote: > > * Jiri Olsa wrote: > > > hi, > > adding support to report error from event string parsing. > > Very nice! > > > This patchset contains support for standard parsing errors and more > > logic to recognize tracepoint and 'pmu//' terms, like: > > > > $ perf record -e 'sched:krava' ls > > invalid or unsupported event: 'sched:krava' > > \___ unknown tracepoint > > > > $ ./perf record -e 'cpu/even=0x1/' ls > > invalid or unsupported event: 'cpu/even=0x1/' > > \___ unknown term > > > > $ perf record -e cycles,cache-mises ls > > invalid or unsupported event: '..es,cache-mises' > > \___ parser error > > > > any feedback about the error string shape would be great ;-) > > So since we now know exactly what's going on, we might want to drop > the 'invalid or unsupported event' language as well, and make it > specific: > > $ ./perf record -e 'cpu/even=0x1/' ls > event syntax error: 'cpu/even=0x1/' > \___ unknown term > > > ? ok > > Also, for the above error, could we easily list the valid terms? An > error like: > > $ ./perf record -e 'cpu/even=0x1/' ls > event syntax error: 'cpu/even=0x1/' > \___ unknown term > valid terms: "event", "raw". > > or so? we already carry list of all terms for given pmu, so it shouldn't be a problem jirka