Skip to content

Commit 6d2c53f

Browse files
author
Robert Richter
committed
oprofile: rename cpu buffer functions
This patch renames cpu buffer functions to something more oprofile specific names. Functions will be moved to the global name space. Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Robert Richter <robert.richter@amd.com>
1 parent bd2172f commit 6d2c53f

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

‎drivers/oprofile/buffer_sync.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ static void add_ibs_begin(int cpu, int code, struct mm_struct *mm)
331331
off_t offset;
332332
struct op_sample *sample;
333333

334-
sample = cpu_buffer_read_entry(cpu);
334+
sample = op_cpu_buffer_read_entry(cpu);
335335
if (!sample)
336336
goto Error;
337337
rip = sample->eip;
@@ -370,7 +370,7 @@ static void add_ibs_begin(int cpu, int code, struct mm_struct *mm)
370370
count = IBS_OP_CODE_SIZE; /*IBS OP is 5 int64s*/
371371

372372
for (i = 0; i < count; i++) {
373-
sample = cpu_buffer_read_entry(cpu);
373+
sample = op_cpu_buffer_read_entry(cpu);
374374
if (!sample)
375375
goto Error;
376376
add_event_entry(sample->eip);
@@ -537,11 +537,11 @@ void sync_buffer(int cpu)
537537

538538
add_cpu_switch(cpu);
539539

540-
cpu_buffer_reset(cpu);
541-
available = cpu_buffer_entries(cpu);
540+
op_cpu_buffer_reset(cpu);
541+
available = op_cpu_buffer_entries(cpu);
542542

543543
for (i = 0; i < available; ++i) {
544-
struct op_sample *s = cpu_buffer_read_entry(cpu);
544+
struct op_sample *s = op_cpu_buffer_read_entry(cpu);
545545
if (!s)
546546
break;
547547

‎drivers/oprofile/cpu_buffer.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,14 @@ add_sample(struct oprofile_cpu_buffer *cpu_buf,
152152
struct op_entry entry;
153153
int ret;
154154

155-
ret = cpu_buffer_write_entry(&entry);
155+
ret = op_cpu_buffer_write_entry(&entry);
156156
if (ret)
157157
return ret;
158158

159159
entry.sample->eip = pc;
160160
entry.sample->event = event;
161161

162-
ret = cpu_buffer_write_commit(&entry);
162+
ret = op_cpu_buffer_write_commit(&entry);
163163
if (ret)
164164
return ret;
165165

‎drivers/oprofile/cpu_buffer.h‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ DECLARE_PER_CPU(struct oprofile_cpu_buffer, cpu_buffer);
6464
* reset these to invalid values; the next sample collected will
6565
* populate the buffer with proper values to initialize the buffer
6666
*/
67-
static inline void cpu_buffer_reset(int cpu)
67+
static inline void op_cpu_buffer_reset(int cpu)
6868
{
6969
struct oprofile_cpu_buffer *cpu_buf = &per_cpu(cpu_buffer, cpu);
7070

7171
cpu_buf->last_is_kernel = -1;
7272
cpu_buf->last_task = NULL;
7373
}
7474

75-
static inline int cpu_buffer_write_entry(struct op_entry *entry)
75+
static inline int op_cpu_buffer_write_entry(struct op_entry *entry)
7676
{
7777
entry->event = ring_buffer_lock_reserve(op_ring_buffer_write,
7878
sizeof(struct op_sample),
@@ -88,13 +88,13 @@ static inline int cpu_buffer_write_entry(struct op_entry *entry)
8888
return 0;
8989
}
9090

91-
static inline int cpu_buffer_write_commit(struct op_entry *entry)
91+
static inline int op_cpu_buffer_write_commit(struct op_entry *entry)
9292
{
9393
return ring_buffer_unlock_commit(op_ring_buffer_write, entry->event,
9494
entry->irq_flags);
9595
}
9696

97-
static inline struct op_sample *cpu_buffer_read_entry(int cpu)
97+
static inline struct op_sample *op_cpu_buffer_read_entry(int cpu)
9898
{
9999
struct ring_buffer_event *e;
100100
e = ring_buffer_consume(op_ring_buffer_read, cpu, NULL);
@@ -111,7 +111,7 @@ static inline struct op_sample *cpu_buffer_read_entry(int cpu)
111111
}
112112

113113
/* "acquire" as many cpu buffer slots as we can */
114-
static inline unsigned long cpu_buffer_entries(int cpu)
114+
static inline unsigned long op_cpu_buffer_entries(int cpu)
115115
{
116116
return ring_buffer_entries_cpu(op_ring_buffer_read, cpu)
117117
+ ring_buffer_entries_cpu(op_ring_buffer_write, cpu);

0 commit comments

Comments
 (0)