lkml.org 
[lkml]   [2008]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [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


    \
     
     \ /
      Last update: 2008-07-26 12:01    [W:3.476 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site