Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1557439imm; Wed, 13 Jun 2018 23:26:25 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLHuchzTTmC/RbjG/wntssTVD45GSFt41Vz0T7hN8hYzZmLupqyQ02vCa3fykb/ZFrMO6tb X-Received: by 2002:a65:4ecd:: with SMTP id w13-v6mr1164898pgq.214.1528957585572; Wed, 13 Jun 2018 23:26:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528957585; cv=none; d=google.com; s=arc-20160816; b=cax5nr53Ehlbbqd8ScvhTGZckL+v1kgCbsvPjxghmEzBbXXyOgfjwX/SSGyOwypfhi Bc0PwCXCy/8mQiOAI5GXbDM3Xt/qvZPGjY/PW9blNISEXb9on1JYRB2CAynZXUEgSU2W A3IAvfA61/XzPcI7TFx3u7k5Du7l2QBpnutQ1/J6XpzjdOBFMwX8YbSSx4sEBqirQUJL 9nIOnX2rC+D7f2avbTjo+xZW3zUUJekEKX2mwbyPnVpvds4q6ygtYc2U2KJnoIc/CmuB wvIUk2SzX13Tm2cGm/HhUFcClVryEo8XDELhe+ATQj1FRFlIAbcA3vXG+DRyJGWWMfO5 SwTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=PAdS6dt87M1BLUTOoOiyp3nXdyIqDX3SXMcRb9z1JH0=; b=Q+ASo64Vs1QMBBS4akpan3JmV2sv2/Gy09jydq+20fbtgG7AUF2FhqdVxDREUGAXX9 lDE00ti655q5E0iV3Reu64hXldqv+wYIlfbCBV7snDa7FbZTJiGPJxb6I6YXSdUzR2v5 Ku/5b7wBHSDHPHPvZANZ2gPVNT4GnRExlxVLAvkqcJ/JgkWm6gqCw7jf7qjiv2GMhTbd 1jYfBmerAO4GJ1LJb6ansLz6RufmnGdoXz9vZfjmkSZkHmJlmuXwlF4H2va5tILDlVdr GOAYfzzecNJVYniccc6DmJxTUv++3abS8Nkx9Uh+OKId2N8uzsFS0m7vwz1o/A+C6YEg 3cUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k79-v6si4584171pfb.34.2018.06.13.23.26.11; Wed, 13 Jun 2018 23:26:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754674AbeFNGXZ (ORCPT + 99 others); Thu, 14 Jun 2018 02:23:25 -0400 Received: from terminus.zytor.com ([198.137.202.136]:60211 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752781AbeFNGXX (ORCPT ); Thu, 14 Jun 2018 02:23:23 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w5E6LEF9763718 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 13 Jun 2018 23:21:14 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w5E6LDBI763715; Wed, 13 Jun 2018 23:21:13 -0700 Date: Wed, 13 Jun 2018 23:21:13 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Jiri Olsa Message-ID: Cc: eranian@google.com, namhyung@kernel.org, peterz@infradead.org, alexander.shishkin@linux.intel.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, dsahern@gmail.com, jolsa@kernel.org, milian.wolff@kdab.com, frederic@kernel.org, mingo@kernel.org, andi@firstfloor.org, acme@redhat.com, hpa@zytor.com Reply-To: peterz@infradead.org, namhyung@kernel.org, eranian@google.com, jolsa@kernel.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, dsahern@gmail.com, alexander.shishkin@linux.intel.com, frederic@kernel.org, milian.wolff@kdab.com, hpa@zytor.com, andi@firstfloor.org, acme@redhat.com, mingo@kernel.org In-Reply-To: <20180606221513.11302-3-jolsa@kernel.org> References: <20180606221513.11302-3-jolsa@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] perf tools: Fix error index for pmu event parser Git-Commit-ID: f7fa827f5f432a0b1f34e10fc49da93aeef9f817 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: f7fa827f5f432a0b1f34e10fc49da93aeef9f817 Gitweb: https://git.kernel.org/tip/f7fa827f5f432a0b1f34e10fc49da93aeef9f817 Author: Jiri Olsa AuthorDate: Thu, 7 Jun 2018 00:15:05 +0200 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 7 Jun 2018 15:50:14 -0300 perf tools: Fix error index for pmu event parser For events we provide specific error message we need to set error column index, PMU parser is missing that, adding it. Before: $ perf stat -e cycles,krava/cycles/ kill event syntax error: 'cycles,krava/cycles/' \___ Cannot find PMU `krava'. Missing kernel support? After: $ perf stat -e cycles,krava/cycles/ kill event syntax error: 'cycles,krava/cycles/' \___ Cannot find PMU `krava'. Missing kernel support? Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Frederic Weisbecker Cc: Milian Wolff Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/20180606221513.11302-3-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/parse-events.y | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y index 155d2570274f..da8fe57691b8 100644 --- a/tools/perf/util/parse-events.y +++ b/tools/perf/util/parse-events.y @@ -227,11 +227,16 @@ event_def: event_pmu | event_pmu: PE_NAME opt_pmu_config { + struct parse_events_state *parse_state = _parse_state; + struct parse_events_error *error = parse_state->error; struct list_head *list, *orig_terms, *terms; if (parse_events_copy_term_list($2, &orig_terms)) YYABORT; + if (error) + error->idx = @1.first_column; + ALLOC_LIST(list); if (parse_events_add_pmu(_parse_state, list, $1, $2, false, false)) { struct perf_pmu *pmu = NULL;