mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Ashwin Chaugule <ashwinc@quicinc.com>
To: linux-tip-commits@vger.kernel.org
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
Subject: [tip:perf/urgent] perf tools: Remove static debugfs path from parse-events
Date: Mon, 12 Oct 2009 20:43:24 GMT	[thread overview]
Message-ID: <tip-63c9e01e1a0dcecc982137d527d44b5ac808b607@git.kernel.org> (raw)
In-Reply-To: <a751bdc6978478de6d10440e587a2cc7.squirrel@www.codeaurora.org>

Commit-ID:  63c9e01e1a0dcecc982137d527d44b5ac808b607
Gitweb:     http://git.kernel.org/tip/63c9e01e1a0dcecc982137d527d44b5ac808b607
Author:     Ashwin Chaugule <ashwinc@quicinc.com>
AuthorDate: Sun, 4 Oct 2009 15:49:34 -0700
Committer:  Ingo Molnar <mingo@elte.hu>
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 <ashwinc@quicinc.com>
Cc: "Arjan van de Ven" <arjan@linux.intel.com>
LKML-Reference: <a751bdc6978478de6d10440e587a2cc7.squirrel@www.codeaurora.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 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 = '/';

      parent reply	other threads:[~2009-10-12 20:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-04 22:49 [RFC] [PATCH 1/1] " ashwinc
2009-10-12 20:41 ` Ingo Molnar
2009-10-12 20:43 ` tip-bot for Ashwin Chaugule [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-63c9e01e1a0dcecc982137d527d44b5ac808b607@git.kernel.org \
    --to=ashwinc@quicinc.com \
    --cc=arjan@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®