mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 16:54:20 +08:00
tracing: Pass type into tracing_generic_entry_update()
All callers of tracing_generic_entry_update() have to initialize entry->type, so let's just simply move it inside. Link: http://lkml.kernel.org/r/20190525165802.25944-2-xiyou.wangcong@gmail.com Cc: Ingo Molnar <mingo@redhat.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
This commit is contained in:
parent
6e55f320f0
commit
46710f3a34
@ -142,6 +142,7 @@ enum print_line_t {
|
||||
enum print_line_t trace_handle_return(struct trace_seq *s);
|
||||
|
||||
void tracing_generic_entry_update(struct trace_entry *entry,
|
||||
unsigned short type,
|
||||
unsigned long flags,
|
||||
int pc);
|
||||
struct trace_event_file;
|
||||
|
@ -743,8 +743,7 @@ trace_event_setup(struct ring_buffer_event *event,
|
||||
{
|
||||
struct trace_entry *ent = ring_buffer_event_data(event);
|
||||
|
||||
tracing_generic_entry_update(ent, flags, pc);
|
||||
ent->type = type;
|
||||
tracing_generic_entry_update(ent, type, flags, pc);
|
||||
}
|
||||
|
||||
static __always_inline struct ring_buffer_event *
|
||||
@ -2312,13 +2311,14 @@ enum print_line_t trace_handle_return(struct trace_seq *s)
|
||||
EXPORT_SYMBOL_GPL(trace_handle_return);
|
||||
|
||||
void
|
||||
tracing_generic_entry_update(struct trace_entry *entry, unsigned long flags,
|
||||
int pc)
|
||||
tracing_generic_entry_update(struct trace_entry *entry, unsigned short type,
|
||||
unsigned long flags, int pc)
|
||||
{
|
||||
struct task_struct *tsk = current;
|
||||
|
||||
entry->preempt_count = pc & 0xff;
|
||||
entry->pid = (tsk) ? tsk->pid : 0;
|
||||
entry->type = type;
|
||||
entry->flags =
|
||||
#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
|
||||
(irqs_disabled_flags(flags) ? TRACE_FLAG_IRQS_OFF : 0) |
|
||||
|
@ -416,8 +416,7 @@ void perf_trace_buf_update(void *record, u16 type)
|
||||
unsigned long flags;
|
||||
|
||||
local_save_flags(flags);
|
||||
tracing_generic_entry_update(entry, flags, pc);
|
||||
entry->type = type;
|
||||
tracing_generic_entry_update(entry, type, flags, pc);
|
||||
}
|
||||
NOKPROBE_SYMBOL(perf_trace_buf_update);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user