From: tip-bot for Frederic Weisbecker <fweisbec@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org, hpa@zytor.com,
mingo@kernel.org, a.p.zijlstra@chello.nl, namhyung@gmail.com,
jolsa@redhat.com, fweisbec@gmail.com, dsahern@gmail.com,
tglx@linutronix.de
Subject: [tip:perf/core] perf hists: Return correct number of characters printed in callchain
Date: Wed, 25 Jul 2012 12:21:50 -0700 [thread overview]
Message-ID: <tip-8760db726e2afcd1a78e2ff58965c6b35a5826cb@git.kernel.org> (raw)
In-Reply-To: <1342631456-7233-2-git-send-email-fweisbec@gmail.com>
Commit-ID: 8760db726e2afcd1a78e2ff58965c6b35a5826cb
Gitweb: http://git.kernel.org/tip/8760db726e2afcd1a78e2ff58965c6b35a5826cb
Author: Frederic Weisbecker <fweisbec@gmail.com>
AuthorDate: Wed, 18 Jul 2012 19:10:55 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 25 Jul 2012 11:31:37 -0300
perf hists: Return correct number of characters printed in callchain
Include the omitted number of characters printed for the first entry.
Not that it really matters because nobody seem to care about the number
of printed characters for now. But just in case.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1342631456-7233-2-git-send-email-fweisbec@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/hist.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 514e2a4..90dc35a 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -708,7 +708,7 @@ static size_t callchain__fprintf_graph(FILE *fp, struct rb_root *root,
bool printed = false;
struct rb_node *node;
int i = 0;
- int ret;
+ int ret = 0;
/*
* If have one single callchain root, don't bother printing
@@ -747,8 +747,9 @@ static size_t callchain__fprintf_graph(FILE *fp, struct rb_root *root,
root = &cnode->rb_root;
}
- return __callchain__fprintf_graph(fp, root, total_samples,
+ ret += __callchain__fprintf_graph(fp, root, total_samples,
1, 1, left_margin);
+ return ret;
}
static size_t __callchain__fprintf_flat(FILE *fp,
next prev parent reply other threads:[~2012-07-25 19:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-18 17:10 [PATCH 1/3] perf tools: Fix trace events storms due to weight demux Frederic Weisbecker
2012-07-18 17:10 ` [PATCH 2/3] perf tools: Return correct number of characters printed in callchain Frederic Weisbecker
2012-07-25 19:21 ` tip-bot for Frederic Weisbecker [this message]
2012-07-18 17:10 ` [PATCH 3/3] perf tools: Print newline between hists callchains Frederic Weisbecker
2012-07-25 19:23 ` [tip:perf/core] perf hists: " tip-bot for Frederic Weisbecker
2012-07-18 17:29 ` [PATCH 1/3] perf tools: Fix trace events storms due to weight demux Frederic Weisbecker
2012-07-25 7:43 ` Ingo Molnar
2012-07-25 19:22 ` [tip:perf/core] " tip-bot for Frederic Weisbecker
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-8760db726e2afcd1a78e2ff58965c6b35a5826cb@git.kernel.org \
--to=fweisbec@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=dsahern@gmail.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.