Loading drivers/oprofile/cpu_buffer.c +1 −1 Original line number Diff line number Diff line Loading @@ -159,7 +159,7 @@ int op_cpu_buffer_write_commit(struct op_entry *entry) struct op_sample *op_cpu_buffer_read_entry(struct op_entry *entry, int cpu) { struct ring_buffer_event *e; e = ring_buffer_consume(op_ring_buffer, cpu, NULL); e = ring_buffer_consume(op_ring_buffer, cpu, NULL, NULL); if (!e) return NULL; Loading include/linux/ftrace_event.h +1 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ struct trace_iterator { /* The below is zeroed out in pipe_read */ struct trace_seq seq; struct trace_entry *ent; unsigned long lost_events; int leftover; int cpu; u64 ts; Loading include/linux/module.h +2 −4 Original line number Diff line number Diff line Loading @@ -465,8 +465,7 @@ static inline void __module_get(struct module *module) if (module) { preempt_disable(); __this_cpu_inc(module->refptr->incs); trace_module_get(module, _THIS_IP_, __this_cpu_read(module->refptr->incs)); trace_module_get(module, _THIS_IP_); preempt_enable(); } } Loading @@ -480,8 +479,7 @@ static inline int try_module_get(struct module *module) if (likely(module_is_live(module))) { __this_cpu_inc(module->refptr->incs); trace_module_get(module, _THIS_IP_, __this_cpu_read(module->refptr->incs)); trace_module_get(module, _THIS_IP_); } else ret = 0; Loading include/linux/ring_buffer.h +4 −2 Original line number Diff line number Diff line Loading @@ -120,9 +120,11 @@ int ring_buffer_write(struct ring_buffer *buffer, unsigned long length, void *data); struct ring_buffer_event * ring_buffer_peek(struct ring_buffer *buffer, int cpu, u64 *ts); ring_buffer_peek(struct ring_buffer *buffer, int cpu, u64 *ts, unsigned long *lost_events); struct ring_buffer_event * ring_buffer_consume(struct ring_buffer *buffer, int cpu, u64 *ts); ring_buffer_consume(struct ring_buffer *buffer, int cpu, u64 *ts, unsigned long *lost_events); struct ring_buffer_iter * ring_buffer_read_start(struct ring_buffer *buffer, int cpu); Loading include/trace/events/module.h +11 −7 Original line number Diff line number Diff line Loading @@ -51,11 +51,14 @@ TRACE_EVENT(module_free, TP_printk("%s", __get_str(name)) ); #ifdef CONFIG_MODULE_UNLOAD /* trace_module_get/put are only used if CONFIG_MODULE_UNLOAD is defined */ DECLARE_EVENT_CLASS(module_refcnt, TP_PROTO(struct module *mod, unsigned long ip, int refcnt), TP_PROTO(struct module *mod, unsigned long ip), TP_ARGS(mod, ip, refcnt), TP_ARGS(mod, ip), TP_STRUCT__entry( __field( unsigned long, ip ) Loading @@ -65,7 +68,7 @@ DECLARE_EVENT_CLASS(module_refcnt, TP_fast_assign( __entry->ip = ip; __entry->refcnt = refcnt; __entry->refcnt = __this_cpu_read(mod->refptr->incs) + __this_cpu_read(mod->refptr->decs); __assign_str(name, mod->name); ), Loading @@ -75,17 +78,18 @@ DECLARE_EVENT_CLASS(module_refcnt, DEFINE_EVENT(module_refcnt, module_get, TP_PROTO(struct module *mod, unsigned long ip, int refcnt), TP_PROTO(struct module *mod, unsigned long ip), TP_ARGS(mod, ip, refcnt) TP_ARGS(mod, ip) ); DEFINE_EVENT(module_refcnt, module_put, TP_PROTO(struct module *mod, unsigned long ip, int refcnt), TP_PROTO(struct module *mod, unsigned long ip), TP_ARGS(mod, ip, refcnt) TP_ARGS(mod, ip) ); #endif /* CONFIG_MODULE_UNLOAD */ TRACE_EVENT(module_request, Loading Loading
drivers/oprofile/cpu_buffer.c +1 −1 Original line number Diff line number Diff line Loading @@ -159,7 +159,7 @@ int op_cpu_buffer_write_commit(struct op_entry *entry) struct op_sample *op_cpu_buffer_read_entry(struct op_entry *entry, int cpu) { struct ring_buffer_event *e; e = ring_buffer_consume(op_ring_buffer, cpu, NULL); e = ring_buffer_consume(op_ring_buffer, cpu, NULL, NULL); if (!e) return NULL; Loading
include/linux/ftrace_event.h +1 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ struct trace_iterator { /* The below is zeroed out in pipe_read */ struct trace_seq seq; struct trace_entry *ent; unsigned long lost_events; int leftover; int cpu; u64 ts; Loading
include/linux/module.h +2 −4 Original line number Diff line number Diff line Loading @@ -465,8 +465,7 @@ static inline void __module_get(struct module *module) if (module) { preempt_disable(); __this_cpu_inc(module->refptr->incs); trace_module_get(module, _THIS_IP_, __this_cpu_read(module->refptr->incs)); trace_module_get(module, _THIS_IP_); preempt_enable(); } } Loading @@ -480,8 +479,7 @@ static inline int try_module_get(struct module *module) if (likely(module_is_live(module))) { __this_cpu_inc(module->refptr->incs); trace_module_get(module, _THIS_IP_, __this_cpu_read(module->refptr->incs)); trace_module_get(module, _THIS_IP_); } else ret = 0; Loading
include/linux/ring_buffer.h +4 −2 Original line number Diff line number Diff line Loading @@ -120,9 +120,11 @@ int ring_buffer_write(struct ring_buffer *buffer, unsigned long length, void *data); struct ring_buffer_event * ring_buffer_peek(struct ring_buffer *buffer, int cpu, u64 *ts); ring_buffer_peek(struct ring_buffer *buffer, int cpu, u64 *ts, unsigned long *lost_events); struct ring_buffer_event * ring_buffer_consume(struct ring_buffer *buffer, int cpu, u64 *ts); ring_buffer_consume(struct ring_buffer *buffer, int cpu, u64 *ts, unsigned long *lost_events); struct ring_buffer_iter * ring_buffer_read_start(struct ring_buffer *buffer, int cpu); Loading
include/trace/events/module.h +11 −7 Original line number Diff line number Diff line Loading @@ -51,11 +51,14 @@ TRACE_EVENT(module_free, TP_printk("%s", __get_str(name)) ); #ifdef CONFIG_MODULE_UNLOAD /* trace_module_get/put are only used if CONFIG_MODULE_UNLOAD is defined */ DECLARE_EVENT_CLASS(module_refcnt, TP_PROTO(struct module *mod, unsigned long ip, int refcnt), TP_PROTO(struct module *mod, unsigned long ip), TP_ARGS(mod, ip, refcnt), TP_ARGS(mod, ip), TP_STRUCT__entry( __field( unsigned long, ip ) Loading @@ -65,7 +68,7 @@ DECLARE_EVENT_CLASS(module_refcnt, TP_fast_assign( __entry->ip = ip; __entry->refcnt = refcnt; __entry->refcnt = __this_cpu_read(mod->refptr->incs) + __this_cpu_read(mod->refptr->decs); __assign_str(name, mod->name); ), Loading @@ -75,17 +78,18 @@ DECLARE_EVENT_CLASS(module_refcnt, DEFINE_EVENT(module_refcnt, module_get, TP_PROTO(struct module *mod, unsigned long ip, int refcnt), TP_PROTO(struct module *mod, unsigned long ip), TP_ARGS(mod, ip, refcnt) TP_ARGS(mod, ip) ); DEFINE_EVENT(module_refcnt, module_put, TP_PROTO(struct module *mod, unsigned long ip, int refcnt), TP_PROTO(struct module *mod, unsigned long ip), TP_ARGS(mod, ip, refcnt) TP_ARGS(mod, ip) ); #endif /* CONFIG_MODULE_UNLOAD */ TRACE_EVENT(module_request, Loading