From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Cc: Ingo Molnar <mingo@elte.hu>,
Frederic Weisbecker <fweisbec@gmail.com>,
Paul Mackerras <paulus@samba.org>,
Peter Zijlstra <peterz@infradead.org>,
Li Zefan <lizf@cn.fujitsu.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] perf_event: fix for processing raw event - fix
Date: Mon, 07 Dec 2009 15:35:59 +0900 [thread overview]
Message-ID: <87aaxv47g0.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <87ein747k7.fsf@devron.myhome.or.jp> (OGAWA Hirofumi's message of "Mon, 07 Dec 2009 15:33:28 +0900")
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> writes:
> Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> writes:
>
>> raw->size is not used, this patch just cleanup it
>
> Oops, I didn't notice those. Thanks.
>
>> Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
>> ---
>> tools/perf/builtin-kmem.c | 38 +++++++-----------
>> tools/perf/builtin-sched.c | 94 +++++++++++++++++++------------------------
>> 2 files changed, 56 insertions(+), 76 deletions(-)
>>
>> diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
>> index f84d7a3..7551a5f 100644
>> --- a/tools/perf/builtin-kmem.c
>> +++ b/tools/perf/builtin-kmem.c
>> @@ -57,11 +57,6 @@ static struct rb_root root_caller_sorted;
>> static unsigned long total_requested, total_allocated;
>> static unsigned long nr_allocs, nr_cross_allocs;
>>
>> -struct raw_event_sample {
>> - u32 size;
>> - char data[0];
>> -};
>> -
>> #define PATH_SYS_NODE "/sys/devices/system/node"
>>
>> static void init_cpunode_map(void)
>> @@ -201,7 +196,7 @@ static void insert_caller_stat(unsigned long call_site,
>> }
>> }
>>
>> -static void process_alloc_event(struct raw_event_sample *raw,
>> +static void process_alloc_event(void *data,
>> struct event *event,
>> int cpu,
>> u64 timestamp __used,
>
> How about the following patch instead of playing with unsafe "void *"?
> With this, I guess it does type check, and filed handling functions can
s/filed handling/field handling of sample raw data/
> check "size" by passing "struct sample_raw_data" instead of "void *" in
> future.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
next prev parent reply other threads:[~2009-12-07 6:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-07 4:04 [PATCH 1/3] perf/sched: fix 'perf sched trace' Xiao Guangrong
2009-12-07 4:06 ` [PATCH 2/3] perf_event: fix for procing raw event Xiao Guangrong
2009-12-07 4:07 ` [PATCH 3/3] perf_event: fix __dsos__write_buildid_table() Xiao Guangrong
2009-12-07 5:19 ` OGAWA Hirofumi
2009-12-07 5:31 ` [tip:perf/urgent] perf_event: Fix __dsos__write_buildid_table() tip-bot for Xiao Guangrong
2009-12-07 4:54 ` [PATCH 2/3] perf_event: fix for procing raw event Xiao Guangrong
2009-12-07 5:04 ` [PATCH] perf_event: fix for processing raw event - fix Xiao Guangrong
2009-12-07 5:31 ` [tip:perf/urgent] perf_event: Eliminate raw->size tip-bot for Xiao Guangrong
2009-12-07 8:13 ` Peter Zijlstra
2009-12-07 8:30 ` Xiao Guangrong
2009-12-07 8:46 ` OGAWA Hirofumi
2009-12-07 6:33 ` [PATCH] perf_event: fix for processing raw event - fix OGAWA Hirofumi
2009-12-07 6:35 ` OGAWA Hirofumi [this message]
2009-12-07 5:31 ` [tip:perf/urgent] perf_event: Fix raw event processing tip-bot for Xiao Guangrong
2009-12-07 5:30 ` [tip:perf/urgent] perf/sched: Fix 'perf sched trace' tip-bot for Xiao Guangrong
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=87aaxv47g0.fsf@devron.myhome.or.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=xiaoguangrong@cn.fujitsu.com \
/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