lkml.org 
[lkml]   [2009]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 06/18] tracing: Ftrace dynamic ftrace_event_call support
> -int trace_define_field(struct ftrace_event_call *call, const char *type,
> - const char *name, int offset, int size, int is_signed,
> +int trace_define_field(struct ftrace_event_call *call, char *type,
> + char *name, int offset, int size, int is_signed,
> int filter_type)

I don't see why you remove "const"?

> {
> struct ftrace_event_field *field;
> @@ -92,9 +92,7 @@ int trace_define_common_fields(struct ftrace_event_call *call)
> }
> EXPORT_SYMBOL_GPL(trace_define_common_fields);

...

> for (i = 0; i < meta->nb_args; i++) {
> - ret = trace_define_field(call, meta->types[i],
> - meta->args[i], offset,
> + ret = trace_define_field(call, (char *)meta->types[i],
> + (char *)meta->args[i], offset,

This is not good..

> sizeof(unsigned long), 0,
> FILTER_OTHER);
> offset += sizeof(unsigned long);
> @@ -277,13 +277,13 @@ void ftrace_syscall_exit(struct pt_regs *regs, long ret)
> trace_current_buffer_unlock_commit(event, 0, 0);
> }

...

> -int reg_event_syscall_exit(void *ptr)
> +int reg_event_syscall_exit(struct ftrace_event_call *call)
> {
> int ret = 0;
> int num;
> char *name;
>
> - name = (char *)ptr;
> + name = (char *)call->data;

nitpick: implicit cast is fine.

> num = syscall_name_to_nr(name);
> if (num < 0 || num >= FTRACE_SYSCALL_MAX)
> return -ENOSYS;
> @@ -342,12 +342,12 @@ int reg_event_syscall_exit(void *ptr)
> return ret;
> }
>
> -void unreg_event_syscall_exit(void *ptr)
> +void unreg_event_syscall_exit(struct ftrace_event_call *call)
> {
> int num;
> char *name;
>
> - name = (char *)ptr;
> + name = (char *)call->data;

ditto

> num = syscall_name_to_nr(name);
> if (num < 0 || num >= FTRACE_SYSCALL_MAX)
> return;


\
 
 \ /
  Last update: 2009-08-27 04:51    [from the cache]
©2003-2011 Jasper Spaans