History

tracing: Rename tracing_reset() to tracing_reset_cpu()

The name tracing_reset() was a misnomer, as it really only reset a single CPU buffer. Rename it to tracing_reset_cpu() and also make it static and remove the prototype from trace.h, as it is only used in a single function.

Steven Rostedt (VMware) committed 7 years ago

Commit a47b53e1 parent 58fe7a82 files · +3 −4Browse files

Showing the changes to kernel/trace (2 of 2 files). Show all

Unified · Split

2 files
  1. kernel/trace/trace.c +3 −3
  2. kernel/trace/trace.h +0 −1
kernel/trace/trace.c+3−3
@@ -1854,7 +1854,7 @@ int __init register_tracer(struct tracer *type) · 1853 unmodified lines
18541854 return ret;
18551855 }
18561856
1857−void tracing_reset(struct trace_buffer *buf, int cpu)
1857+static void tracing_reset_cpu(struct trace_buffer *buf, int cpu)
18581858 {
18591859 struct ring_buffer *buffer = buf->buffer;
18601860
@@ -4251,7 +4251,7 @@ static int tracing_open(struct inode *inode, struct file *file) · 2390 unmodified lines
42514251 if (cpu == RING_BUFFER_ALL_CPUS)
42524252 tracing_reset_online_cpus(trace_buf);
42534253 else
4254− tracing_reset(trace_buf, cpu);
4254+ tracing_reset_cpu(trace_buf, cpu);
42554255 }
42564256
42574257 if (file->f_mode & FMODE_READ) {
@@ -6742,7 +6742,7 @@ tracing_snapshot_write(struct file *filp, const char __user *ubuf, size_t cnt, · 2484 unmodified lines
67426742 if (iter->cpu_file == RING_BUFFER_ALL_CPUS)
67436743 tracing_reset_online_cpus(&tr->max_buffer);
67446744 else
6745− tracing_reset(&tr->max_buffer, iter->cpu_file);
6745+ tracing_reset_cpu(&tr->max_buffer, iter->cpu_file);
67466746 }
67476747 break;
67486748 }
kernel/trace/trace.h+0−1
@@ -677,7 +677,6 @@ trace_buffer_iter(struct trace_iterator *iter, int cpu) · 676 unmodified lines
677677
678678 int tracer_init(struct tracer *t, struct trace_array *tr);
679679 int tracing_is_enabled(void);
680−void tracing_reset(struct trace_buffer *buf, int cpu);
681680 void tracing_reset_online_cpus(struct trace_buffer *buf);
682681 void tracing_reset_current(int cpu);
683682 void tracing_reset_all_online_cpus(void);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t