Merge branches 'tracing/docs', 'tracing/filters', 'tracing/ftrace', 'tracing/kprobes...
authorIngo Molnar <mingo@elte.hu>
Tue, 31 Mar 2009 15:46:40 +0000 (17:46 +0200)
committerIngo Molnar <mingo@elte.hu>
Tue, 31 Mar 2009 15:46:40 +0000 (17:46 +0200)
1  2  3  4  5  6 
kernel/trace/ring_buffer.c
kernel/trace/trace.c
kernel/trace/trace.h

Simple merge
Simple merge
index 7cfb741be2001862b3ddba9df6109f422b631bbd,90a848debcbaac57010a2e6ad9a53e95b19f9807,d7410bbb9a803f2052ba8c1921354991194a0234,7cfb741be2001862b3ddba9df6109f422b631bbd,38276d1638e33e9a236e19a603a5e0bee28bc2ab,7cfb741be2001862b3ddba9df6109f422b631bbd..cb0ce3fc36d31d5312c1c2952f2584fa2a62c3da
        TRACE_EVENT_TYPE_RAW            = 2,
      };
      
+ ++++struct ftrace_event_field {
+ ++++  struct list_head        link;
+ ++++  char                    *name;
+ ++++  char                    *type;
+ ++++  int                     offset;
+ ++++  int                     size;
+ ++++};
+ ++++
      struct ftrace_event_call {
- ----  char            *name;
- ----  char            *system;
- ----  struct dentry   *dir;
- ----  int             enabled;
- ----  int             (*regfunc)(void);
- ----  void            (*unregfunc)(void);
- ----  int             id;
- ----  int             (*raw_init)(void);
- ----  int             (*show_format)(struct trace_seq *s);
+ ++++  char                    *name;
+ ++++  char                    *system;
+ ++++  struct dentry           *dir;
+ ++++  int                     enabled;
+ ++++  int                     (*regfunc)(void);
+ ++++  void                    (*unregfunc)(void);
+ ++++  int                     id;
+ ++++  int                     (*raw_init)(void);
+ ++++  int                     (*show_format)(struct trace_seq *s);
+ ++++  int                     (*define_fields)(void);
+ ++++  struct list_head        fields;
+ ++++  struct filter_pred      **preds;
    + 
    + #ifdef CONFIG_EVENT_PROFILE
    +   atomic_t        profile_count;
    +   int             (*profile_enable)(struct ftrace_event_call *);
    +   void            (*profile_disable)(struct ftrace_event_call *);
    + #endif
      };
      
+ ++++struct event_subsystem {
+ ++++  struct list_head        list;
+ ++++  const char              *name;
+ ++++  struct dentry           *entry;
+ ++++  struct filter_pred      **preds;
+ ++++};
+ ++++
+ ++++#define events_for_each(event)                                            \
+ ++++  for (event = __start_ftrace_events;                             \
+ ++++       (unsigned long)event < (unsigned long)__stop_ftrace_events; \
+ ++++       event++)
+ ++++
+ ++++#define MAX_FILTER_PRED 8
+ ++++
+ ++++struct filter_pred;
+ ++++
+ ++++typedef int (*filter_pred_fn_t) (struct filter_pred *pred, void *event);
+ ++++
+ ++++struct filter_pred {
+ ++++  filter_pred_fn_t fn;
+ ++++  u64 val;
+ ++++  char *str_val;
+ ++++  int str_len;
+ ++++  char *field_name;
+ ++++  int offset;
+ ++++  int not;
+ ++++  int or;
+ ++++  int compound;
+ ++++  int clear;
+ ++++};
+ ++++
+ ++++int trace_define_field(struct ftrace_event_call *call, char *type,
+ ++++                 char *name, int offset, int size);
+ ++++extern void filter_free_pred(struct filter_pred *pred);
+ ++++extern void filter_print_preds(struct filter_pred **preds,
+ ++++                         struct trace_seq *s);
+ ++++extern int filter_parse(char **pbuf, struct filter_pred *pred);
+ ++++extern int filter_add_pred(struct ftrace_event_call *call,
+ ++++                     struct filter_pred *pred);
+ ++++extern void filter_free_preds(struct ftrace_event_call *call);
+ ++++extern int filter_match_preds(struct ftrace_event_call *call, void *rec);
+ ++++extern void filter_free_subsystem_preds(struct event_subsystem *system);
+ ++++extern int filter_add_subsystem_pred(struct event_subsystem *system,
+ ++++                               struct filter_pred *pred);
+ ++++
      void event_trace_printk(unsigned long ip, const char *fmt, ...);
      extern struct ftrace_event_call __start_ftrace_events[];
      extern struct ftrace_event_call __stop_ftrace_events[];