Messages in this thread | | | Date | Sat, 26 Jul 2008 11:58:33 +0200 | From | Ingo Molnar <> | Subject | Re: [PATCH 10/24] x86/oprofile: Add IBS support for AMD CPUs, IBS buffer handling routines |
| |
* Robert Richter <robert.richter@amd.com> wrote:
> @@ -272,7 +273,7 @@ static void increment_tail(struct oprofile_cpu_buffer *b) > { > unsigned long new_tail = b->tail_pos + 1; > > - rmb(); > + rmb(); /* be sure fifo pointers are synchromized */
ignore my previous mail :-)
> + if (ibs_code == IBS_OP_BEGIN) { > + add_sample(cpu_buf, ibs[6], ibs[7]); > + add_sample(cpu_buf, ibs[8], ibs[9]); > + add_sample(cpu_buf, ibs[10], ibs[11]); > + }
style problem.
> + int is_kernel = !user_mode(regs); > + unsigned long pc = profile_pc(regs); > + > + struct oprofile_cpu_buffer *cpu_buf = > + &per_cpu(cpu_buffer, smp_processor_id());
please dont put newlines in the middle of variable definitions.
> /* transient events for the CPU buffer -> event buffer */ > #define CPU_IS_KERNEL 1 > #define CPU_TRACE_BEGIN 2 > +#define IBS_FETCH_BEGIN 3 > +#define IBS_OP_BEGIN 4
vertical alignment would help readability i guess. Plus use an enum instead of a macro.
Ingo
| |