Hi Tim,

On Thu, 06 Mar 2008 14:38:50 -0600 "Timothy R. Chavez" <[EMAIL PROTECTED]> 
wrote:

> Gilles,
> 
> Gilles Carry wrote:
> >     - configurable criteria (-m argument)
> >     - configurable iterations
> >     - check stats init return codes
> >
> > Signed-off-by: Gilles Carry <[EMAIL PROTECTED]>
> > Cc: Darren Hart <[EMAIL PROTECTED]>
> > Cc: Tim Chavez <[EMAIL PROTECTED]>
> >   
> 
> Thanks for the fixes and enhancements.  A few comments below..
> 
> > ---
> >  .../realtime/func/hrtimer-prio/hrtimer-prio.c      |   32 
> > +++++++++++++------
> >  1 files changed, 22 insertions(+), 10 deletions(-)
> >
> > diff --git a/testcases/realtime/func/hrtimer-prio/hrtimer-prio.c 
> > b/testcases/realtime/func/hrtimer-prio/hrtimer-prio.c
> > index 3fdda64..f22ca83 100644
> > --- a/testcases/realtime/func/hrtimer-prio/hrtimer-prio.c
> > +++ b/testcases/realtime/func/hrtimer-prio/hrtimer-prio.c
> > @@ -49,7 +49,7 @@
> >  #include <libjvmsim.h>
> >  #include <libstats.h>
> >
> > -#define DEF_MED_PRIO 60            // (softirqd-hrtimer,98]
> > +#define DEF_MED_PRIO 60            // (softirqd-hrtimer,98)
> >  #define DEF_ITERATIONS 10000
> >  #define HIST_BUCKETS 100
> >  #define DEF_BUSY_TIME 10   // Duration of busy work in milliseconds
> > @@ -58,10 +58,10 @@
> >
> >  static int run_jvmsim = 0;
> >  static int med_prio = DEF_MED_PRIO;
> > -static int high_prio = DEF_MED_PRIO+1;
> > +static int high_prio;
> >  static int busy_time = DEF_BUSY_TIME;
> >  static int iterations = DEF_ITERATIONS;
> > -static unsigned long criteria = DEF_CRITERIA;      // FIXME: make 
> > configurable
> > +static unsigned long criteria = DEF_CRITERIA;
> >  static int busy_threads;
> >
> >  static stats_container_t dat;
> > @@ -78,6 +78,7 @@ void usage(void)
> >     printf("  -i#           #:number of iterations, defaults to %d\n", 
> > DEF_ITERATIONS);
> >     printf("  -n#           #:number of busy threads, defaults to 
> > NR_CPUS*2\n");
> >     printf("  -f#           #:rt fifo priority of busy threads (1,98), 
> > defaults to %d\n", DEF_MED_PRIO);
> > +   printf("  -m#           #:maximum timer latency in microseconds, 
> > defaults to %d\n", DEF_CRITERIA);
> >  }
> >
> >  int parse_args(int c, char *v)
> > @@ -99,11 +100,12 @@ int parse_args(int c, char *v)
> >                     break;
> >             case 'f':
> >                     med_prio = MIN(atoi(v), 98);
> > -                   high_prio = med_prio+1;
> >                     break;
> >                  case 'i':
> > -                   printf("Setting iterations disabled\n");
> > -                    // iterations = atoi(v);
> > +                   iterations = atoi(v);
> > +                        break;
> >   
> Whitespace problem.  Also, this looks like it needs at least some 
> bare-minimum bounds checking...

  Yep, that's easier to decipher than an error when initializing
quantiles. Maybe all tests accepting a variable number of iterations
and using quantiles should include such a check.

> 
> if (iterations < 100) {
>       printf("Number of iterations cannot be less than 100")
>       sys.exit(1)

    Hum, too much python on your hands I guess ;-)


  Sebastien.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to