Re: [PATCH] kmemtrace: print binary output only if 'bin' option isset

From: Li Zefan
Date: Thu Jul 02 2009 - 20:35:58 EST


Steven Rostedt wrote:
> On Thu, 2 Jul 2009, Li Zefan wrote:
>> ---
>> kernel/trace/kmemtrace.c | 119 ++++++++++++++++++++++++++++++++++------------
>> 1 files changed, 89 insertions(+), 30 deletions(-)
>>
>> diff --git a/kernel/trace/kmemtrace.c b/kernel/trace/kmemtrace.c
>> index 1edaa95..9a58f37 100644
>> --- a/kernel/trace/kmemtrace.c
>> +++ b/kernel/trace/kmemtrace.c
>> @@ -239,12 +239,51 @@ struct kmemtrace_user_event_alloc {
>> };
>>
>> static enum print_line_t
>> -kmemtrace_print_alloc_user(struct trace_iterator *iter,
>> - struct kmemtrace_alloc_entry *entry)
>> +kmemtrace_print_alloc_user(struct trace_iterator *iter, int flags)
>> +{
>> + struct trace_seq *s = &iter->seq;
>> + struct kmemtrace_alloc_entry *entry;
>> + int ret;
>> +
>> + trace_assign_type(entry, iter->ent);
>> +
>> + ret = trace_seq_printf(s, "type_id %d call_site %lu ptr %lu "
>> + "bytes_req %lu bytes_alloc %lu gfp_flags %lu node %d\n",
>> + entry->type_id, entry->call_site, (unsigned long)entry->ptr,
>> + (unsigned long)entry->bytes_req, (unsigned long)entry->bytes_alloc,
>> + (unsigned long)entry->gfp_flags, entry->node);
>
> Could we make the call_site %pF ? That way we can see the name of the
> function and not just the address.
>

Sure, I'll fix it. I just restored the old format.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/