Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932284AbZJLUob (ORCPT ); Mon, 12 Oct 2009 16:44:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758151AbZJLUoa (ORCPT ); Mon, 12 Oct 2009 16:44:30 -0400 Received: from hera.kernel.org ([140.211.167.34]:48188 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758142AbZJLUo3 (ORCPT ); Mon, 12 Oct 2009 16:44:29 -0400 Date: Mon, 12 Oct 2009 20:43:24 GMT From: tip-bot for Ashwin Chaugule Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com, arjan@linux.intel.com, tglx@linutronix.de, ashwinc@quicinc.com, mingo@elte.hu Reply-To: mingo@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org, arjan@linux.intel.com, tglx@linutronix.de, ashwinc@quicinc.com, mingo@elte.hu In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] perf tools: Remove static debugfs path from parse-events Message-ID: Git-Commit-ID: 63c9e01e1a0dcecc982137d527d44b5ac808b607 X-Mailer: tip-git-log-daemon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (hera.kernel.org [127.0.0.1]); Mon, 12 Oct 2009 20:43:25 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1582 Lines: 41 Commit-ID: 63c9e01e1a0dcecc982137d527d44b5ac808b607 Gitweb: http://git.kernel.org/tip/63c9e01e1a0dcecc982137d527d44b5ac808b607 Author: Ashwin Chaugule AuthorDate: Sun, 4 Oct 2009 15:49:34 -0700 Committer: Ingo Molnar CommitDate: Mon, 12 Oct 2009 22:41:05 +0200 perf tools: Remove static debugfs path from parse-events Timechart doesn't work if debugfs is not in /sys/kernel/debug/. Fixed by using global debugfs_path which is filled in by perf. Signed-off-by: Ashwin Chaugule Cc: "Arjan van de Ven" LKML-Reference: Signed-off-by: Ingo Molnar --- tools/perf/util/parse-events.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 87c424d..8cfb48c 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -691,7 +691,10 @@ static void store_event_type(const char *orgname) FILE *file; int id; - sprintf(filename, "/sys/kernel/debug/tracing/events/%s/id", orgname); + sprintf(filename, "%s/", debugfs_path); + strncat(filename, orgname, strlen(orgname)); + strcat(filename, "/id"); + c = strchr(filename, ':'); if (c) *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/