This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: timing analyis for ecos API


On Wed, 2001-12-12 at 14:19, shahmilmerchant@aol.com wrote:
> Well i have ecos built as a linux synthetic target.Also i want to use the thread creation and deletion semantic in my ecos program.I try using the cyg_real_time_clock() but somehow i get the same values for all the threads i create .I also try doing the same over a mutex and try measuring the context switching time,but i get the same values in that case too.Is there any api etc that i can use.
> Also when i try runing the executable i get the following message
> NOTAPPLICABLE:<Timing tests require:
> CYGFUN_KERENEL_API_C &&
> CYGSEM_KERNEL_SCHED_MLQUEUE &&
> CYGVAR_KERNEL_COUNTERS_CLOCK &&
> !CYGPKG_HAL_I386_LINUX &&
> !CYGDBG_INFRA_DIAG_USE_DEVICE &&
> (CYGNUM_KERNEL_SCHED_PRIORITIES > 12)
> >
> 
> and it just hangs after this.
> Any ideas?
> shahmil

It worked just fine for me.  Here are exactly the steps I took:

    [gthomas@hermes pc_test]$ ecosconfig new linux
    [gthomas@hermes pc_test]$ ecosconfig tree
    [gthomas@hermes pc_test]$ make
    [gthomas@hermes pc_test]$ make -C kernel/current tests TESTS=tests/tm_basic
    [gthomas@hermes pc_test]$ install/tests/kernel/current/tests/tm_basic 
                Startup, main stack : stack used    80 size 32768
                 Startup : Idlethread stack used    56 size 16384
    
    eCos Kernel Timings
    Notes: all times are in microseconds (.000001) unless otherwise stated
    
    Reading the hardware clock takes 0 'ticks' overhead
    ... this value will be factored out of all other measurements
    Clock interrupt took    9.34 microseconds (9 raw clock ticks)
    
    Testing parameters:
       Clock samples:            32
       Threads:                  31
       Thread switches:         128
       Mutexes:                  32
       Mailboxes:                32
       Semaphores:               32
       Scheduler operations:    128
       Counters:                 32
       Alarms:                   32
    
    
                                     Confidence
         Ave     Min     Max     Var  Ave  Min  Function
      ======  ======  ======  ====== ========== ========
       16.13    2.00   34.00    1.91   83%    3%  Create thread
        1.06    1.00    3.00    0.12   96%   96%  Yield thread [all suspended]
        1.19    1.00    2.00    0.31   80%   80%  Suspend [suspended] thread
        1.16    1.00    3.00    0.28   87%   87%  Resume thread
        1.39    1.00    3.00    0.50   64%   64%  Set priority
        1.13    1.00    2.00    0.22   87%   87%  Get priority
        5.35    1.00  109.00    6.79   96%   96%  Kill [suspended] thread
        1.42    1.00    3.00    0.51   61%   61%  Yield [no other] thread
        1.48    1.00    4.00    0.56   96%   58%  Resume [suspended low prio] thread
        1.23    1.00    3.00    0.36   80%   80%  Resume [runnable low prio] thread
        1.52    1.00    4.00    0.57   96%   54%  Suspend [runnable] thread
        1.13    1.00    2.00    0.22   87%   87%  Yield [only low prio] thread
        1.16    1.00    2.00    0.27   83%   83%  Suspend [runnable->not runnable]
        1.74    1.00    5.00    0.53   61%   35%  Kill [runnable] thread
        1.81    1.00    6.00    0.52   64%   32%  Destroy [dead] thread
        2.03    1.00    6.00    0.38   74%   16%  Destroy [runnable] thread
        2.97    2.00    8.00    0.50   64%   25%  Resume [high priority] thread
        1.20    1.00    2.00    0.32   79%   79%  Thread switch
    
        1.13    0.00   26.00    0.39   92%    6%  Scheduler lock
        1.01    1.00    2.00    0.01   99%   99%  Scheduler unlock [0 threads]
        1.00    1.00    1.00    0.00  100%  100%  Scheduler unlock [1 suspended]
        1.01    1.00    2.00    0.01   99%   99%  Scheduler unlock [many suspended]
        1.02    1.00    2.00    0.03   98%   98%  Scheduler unlock [many low prio]
    
        1.50    1.00   16.00    0.94   96%   93%  Init mutex
        1.19    1.00    4.00    0.33   87%   87%  Lock [unlocked] mutex
        1.34    1.00    4.00    0.49   71%   71%  Unlock [locked] mutex
        1.16    1.00    3.00    0.27   87%   87%  Trylock [unlocked] mutex
        1.16    1.00    2.00    0.26   84%   84%  Trylock [locked] mutex
        1.19    1.00    2.00    0.30   81%   81%  Destroy mutex
        7.00    4.00   10.00    1.25   62%   18%  Unlock/Lock mutex
    
        2.31    1.00   29.00    2.40   93%   93%  Create mbox
        1.19    1.00    2.00    0.30   81%   81%  Peek [empty] mbox
        1.25    1.00    3.00    0.39   78%   78%  Put [first] mbox
        1.03    1.00    2.00    0.06   96%   96%  Peek [1 msg] mbox
        1.25    1.00    3.00    0.39   78%   78%  Put [second] mbox
        1.06    1.00    2.00    0.12   93%   93%  Peek [2 msgs] mbox
        1.44    1.00    4.00    0.55   62%   62%  Get [first] mbox
        1.25    1.00    3.00    0.39   78%   78%  Get [second] mbox
        1.25    1.00    3.00    0.39   78%   78%  Tryput [first] mbox
        1.19    1.00    2.00    0.30   81%   81%  Peek item [non-empty] mbox
        1.38    1.00    3.00    0.49   65%   65%  Tryget [non-empty] mbox
        1.06    1.00    2.00    0.12   93%   93%  Peek item [empty] mbox
        1.25    1.00    3.00    0.39   78%   78%  Tryget [empty] mbox
        1.09    1.00    2.00    0.17   90%   90%  Waiting to get mbox
        1.16    0.00    2.00    0.32   78%    3%  Waiting to put mbox
        1.41    1.00    4.00    0.53   65%   65%  Delete mbox
        6.31    2.00    8.00    1.13   56%    6%  Put/Get mbox
    
        1.50    1.00   17.00    0.97   96%   96%  Init semaphore
        1.72    1.00   22.00    1.35   96%   93%  Post [0] semaphore
        1.06    1.00    3.00    0.12   96%   96%  Wait [1] semaphore
        1.03    1.00    2.00    0.06   96%   96%  Trywait [0] semaphore
        1.03    1.00    2.00    0.06   96%   96%  Trywait [1] semaphore
        1.03    0.00    2.00    0.12   90%    3%  Peek semaphore
        1.03    1.00    2.00    0.06   96%   96%  Destroy semaphore
        5.63    3.00    8.00    1.23   43%   25%  Post/Wait semaphore
    
        2.00    1.00   32.00    1.88   96%   96%  Create counter
        1.09    1.00    2.00    0.17   90%   90%  Get counter value
        1.03    0.00    2.00    0.12   90%    3%  Set counter value
        1.22    1.00    3.00    0.36   81%   81%  Tick counter
        1.13    1.00    2.00    0.22   87%   87%  Delete counter
    
        2.34    1.00   42.00    2.48   96%   96%  Create alarm
        1.25    1.00    3.00    0.39   78%   78%  Initialize alarm
        1.06    1.00    2.00    0.12   93%   93%  Disable alarm
        1.34    1.00    3.00    0.47   68%   68%  Enable alarm
        1.13    1.00    2.00    0.22   87%   87%  Delete alarm
        1.22    1.00    2.00    0.34   78%   78%  Tick counter [1 alarm]
        3.06    3.00    4.00    0.12   93%   93%  Tick counter [many alarms]
        1.28    1.00    3.00    0.42   75%   75%  Tick & fire counter [1 alarm]
        5.78    5.00    7.00    0.39   71%   25%  Tick & fire counters [>1 together]
        3.19    3.00    5.00    0.32   84%   84%  Tick & fire counters [>1 separately]
        7.99    5.00   16.00    1.17   72%   16%  Alarm latency [0 threads]
       10.52    4.00   17.00    1.98   60%    1%  Alarm latency [2 threads]
       13.34    5.00  255.00    6.87   88%   76%  Alarm latency [many threads]
       15.29   10.00   29.00    1.85   64%    3%  Alarm -> thread resume latency
    
     1169    1096    1228  (main stack:  1600)  Thread stack used (16384 total)
               All done, main stack : stack used  1600 size 32768
                All done : Idlethread stack used  1300 size 16384
    
    Timing complete - 27650 ms total
    
    PASS:<Basic timing OK>
    EXIT:<done>



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]