lkml.org 
[lkml]   [2009]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH 1/4] perf bench: Add new subsystem and new suite, bench/mem-memcpy.c
    From
    From: Ingo Molnar <mingo@elte.hu>
    Subject: Re: [PATCH 1/4] perf bench: Add new subsystem and new suite, bench/mem-memcpy.c
    Date: Fri, 13 Nov 2009 10:46:50 +0100

    I've fixed mem-memcpy.c according to your comment,
    but I also have some comments.

    >
    > > +};
    > > +
    > > +struct routine routines[] = {
    > > + { "default",
    > > + memcpy,
    > > + "Default memcpy() provided by glibc" },
    > > + { NULL,
    > > + NULL,
    > > + NULL }
    >
    > { NULL, } would be equivalent i guess.

    Initializing the termination with { NULL, } causes build error.
    So I can't change this point.

    > > + break;
    > > + case BENCH_FORMAT_SIMPLE:
    > > + if (use_clockcycle)
    > > + printf("%lf\n",
    > > + (double)clock_diff / (double)length);
    > > + else
    > > + printf("%lf\n", bps);
    > > + break;
    > > + default:
    > > + /* reaching here is something disaster */
    > > + fprintf(stderr, "Unknown format:%d\n", bench_format);
    >
    > could use pr_err() here i guess.

    It seems that pr_err() is a wrapper for printk(),
    so I can't use pr_err() in perf.

    I'll send the patch later. Thanks for your comments!
    Hitoshi


    \
     
     \ /
      Last update: 2009-11-17 12:21    [W:4.565 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site