Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756520AbbHZNq7 (ORCPT ); Wed, 26 Aug 2015 09:46:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57333 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756099AbbHZNq6 (ORCPT ); Wed, 26 Aug 2015 09:46:58 -0400 From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , David Ahern , Ingo Molnar , Namhyung Kim , Peter Zijlstra , Matt Fleming , =?UTF-8?q?Rapha=C3=ABl=20Beamonte?= Subject: [RFC 00/11] perf tools: Enhance parsing events tracepoint error output Date: Wed, 26 Aug 2015 15:46:42 +0200 Message-Id: <1440596813-12844-1-git-send-email-jolsa@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3441 Lines: 73 hi, enhancing parsing events tracepoint error output. Adding more verbose output when the tracepoint is not found or the tracing event path cannot be access. $ sudo perf record -e sched:sched_krava ls event syntax error: 'sched:sched_krava' \___ unknown tracepoint Error: File /sys/kernel/debug/tracing//tracing/events/sched/sched_krava not found. Hint: Perhaps this kernel misses some CONFIG_ setting to enable this feature?. Run 'perf list' for a list of valid events ... $ perf record -e sched:sched_krava ls event syntax error: 'sched:sched_krava' \___ can't access trace events Error: No permissions to read /sys/kernel/debug/tracing//tracing/events/sched/sched_krava Hint: Try 'sudo mount -o remount,mode=755 /sys/kernel/debug' Run 'perf list' for a list of valid events ... I changed api/fs tracefs/debugfs related code and I'm not completely sure what were the long term intentions with this code, so please comment ;-) jirka --- Jiri Olsa (11): tools: Add err.h with ERR_PTR PTR_ERR interface perf tools: Add tracing_path and remove unneeded functions perf tools: Do not change lib/api/fs/debugfs directly perf tools: Move debugfs__strerror_open into util.c object perf tools: Move tracing_path stuff under same namespace perf tools: Move tracing_path interface into trace-event-path.c perf tools: Make tracing_path_strerror_open message generic perf tools: Do not export debugfs_mountpoint and tracefs_mountpoint perf tools: Propagate error info for the tracepoint parsing perf tools: Propagate error info from tp_format perf tools: Enhance parsing events tracepoint error output tools/include/linux/err.h | 28 +++++++++++++++++++ tools/lib/api/fs/debugfs.c | 53 +----------------------------------- tools/lib/api/fs/debugfs.h | 5 ---- tools/lib/api/fs/tracefs.c | 2 +- tools/lib/api/fs/tracefs.h | 2 -- tools/perf/builtin-trace.c | 4 +-- tools/perf/perf.c | 11 ++++---- tools/perf/tests/openat-syscall-all-cpus.c | 2 ++ tools/perf/tests/openat-syscall.c | 2 ++ tools/perf/util/Build | 1 + tools/perf/util/evsel.c | 8 ++++-- tools/perf/util/parse-events.c | 58 ++++++++++++++++++++++++++++++---------- tools/perf/util/parse-events.h | 3 ++- tools/perf/util/parse-events.y | 16 ++++++----- tools/perf/util/trace-event-path.c | 129 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tools/perf/util/trace-event.c | 7 +++-- tools/perf/util/trace-event.h | 12 +++++++++ tools/perf/util/util.c | 119 --------------------------------------------------------------------------------- tools/perf/util/util.h | 8 ------ 19 files changed, 250 insertions(+), 220 deletions(-) create mode 100644 tools/include/linux/err.h create mode 100644 tools/perf/util/trace-event-path.c -- 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/