mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Frederic Weisbecker <fweisbec@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, acme@redhat.com, anton@samba.org,
	paulus@samba.org, hpa@zytor.com, mingo@redhat.com,
	a.p.zijlstra@chello.nl, efault@gmx.de, fweisbec@gmail.com,
	tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perfcounters/urgent] perf_counter tools: Fix storage size allocation of callchain list
Date: Wed, 1 Jul 2009 08:46:17 GMT	[thread overview]
Message-ID: <tip-9198aa77b69647d1d91207f8075763abe7dc0bf4@git.kernel.org> (raw)
In-Reply-To: <1246419315-9968-2-git-send-email-fweisbec@gmail.com>

Commit-ID:  9198aa77b69647d1d91207f8075763abe7dc0bf4
Gitweb:     http://git.kernel.org/tip/9198aa77b69647d1d91207f8075763abe7dc0bf4
Author:     Frederic Weisbecker <fweisbec@gmail.com>
AuthorDate: Wed, 1 Jul 2009 05:35:13 +0200
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 1 Jul 2009 09:58:23 +0200

perf_counter tools: Fix storage size allocation of callchain list

Fix a confusion while giving the size of a callchain list
during its allocation. We are using the wrong structure size.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Anton Blanchard <anton@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <1246419315-9968-2-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 tools/perf/util/callchain.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c
index ad3c285..bbf7813 100644
--- a/tools/perf/util/callchain.c
+++ b/tools/perf/util/callchain.c
@@ -74,7 +74,7 @@ fill_node(struct callchain_node *node, struct ip_callchain *chain, int start)
 	for (i = start; i < chain->nr; i++) {
 		struct callchain_list *call;
 
-		call = malloc(sizeof(*chain));
+		call = malloc(sizeof(*call));
 		if (!call) {
 			perror("not enough memory for the code path tree");
 			return;

  reply	other threads:[~2009-07-01  9:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-01  3:35 [PATCH 0/3] perfcounter: callchain symbol resolving and fixes Frederic Weisbecker
2009-07-01  3:35 ` [PATCH 1/3] perfcounter: Fix storage size allocation of callchain list Frederic Weisbecker
2009-07-01  8:46   ` tip-bot for Frederic Weisbecker [this message]
2009-07-01  3:35 ` [PATCH 2/3] perfcounter: Resolve symbols in callchains Frederic Weisbecker
2009-07-01  8:46   ` [tip:perfcounters/urgent] perf_counter tools: " tip-bot for Frederic Weisbecker
2009-07-01  3:35 ` [PATCH 3/3] perfcounter: Various fixes for callchains Frederic Weisbecker
2009-07-01  8:46   ` [tip:perfcounters/urgent] perf_counter tools: " tip-bot for Frederic Weisbecker
2009-07-01  8:18 ` [PATCH 0/3] perfcounter: callchain symbol resolving and fixes Ingo Molnar
2009-07-01 16:33   ` Frederic Weisbecker
2009-07-01 17:14     ` 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-9198aa77b69647d1d91207f8075763abe7dc0bf4@git.kernel.org \
    --to=fweisbec@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=anton@samba.org \
    --cc=efault@gmx.de \
    --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=paulus@samba.org \
    --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

Powered by JetHome