Changeset bd37119 for src/benchmark


Ignore:
Timestamp:
Aug 23, 2017, 5:57:51 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
d3e4d6c
Parents:
9ef4dcc
Message:

Fix benchmarks for references

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/benchmark/csv-data.c

    r9ef4dcc rbd37119  
    88coroutine GreatSuspender {};
    99
    10 void ?{}( GreatSuspender * this ) {
     10void ?{}( GreatSuspender & this ) {
    1111        prime(this);
    1212}
    1313
    14 void main( GreatSuspender * this )
     14void main( GreatSuspender & this )
    1515{
    1616        while( true ) {
     
    2121void resumer( GreatSuspender * this, const unsigned int NoOfTimes ) {
    2222        for ( volatile unsigned int i = 0; i < NoOfTimes; i += 1 ) {
    23                 resume( this );
     23                resume( *this );
    2424        }
    2525}
     
    5858// single monitor entry
    5959monitor mon_t {};
    60 void dummy( mon_t * mutex m ) {}
     60void dummy( mon_t & mutex m ) {}
    6161
    6262long long int measure_1_monitor_entry() {
     
    6767        StartTime = Time();
    6868        for ( volatile unsigned int i = 0; i < NoOfTimes; i += 1 ) {
    69                 dummy( &mon );
     69                dummy( mon );
    7070        }
    7171        EndTime = Time();
     
    7676//-----------------------------------------------------------------------------
    7777// multi monitor entry
    78 void dummy( mon_t * mutex m1,  mon_t * mutex m2 ) {}
     78void dummy( mon_t & mutex m1,  mon_t & mutex m2 ) {}
    7979
    8080long long int measure_2_monitor_entry() {
     
    8585        StartTime = Time();
    8686        for ( volatile unsigned int i = 0; i < NoOfTimes; i += 1 ) {
    87                 dummy( &mon1, &mon2 );
     87                dummy( mon1, mon2 );
    8888        }
    8989        EndTime = Time();
     
    102102thread thrd1b {};
    103103
    104 void ?{}( thrd1a * this, long long int * out ) {
    105         this->out = out;
    106 }
    107 
    108 void side1A( mon_t * mutex a, long long int * out ) {
     104void ?{}( thrd1a & this, long long int * out ) {
     105        this.out = out;
     106}
     107
     108void side1A( mon_t & mutex a, long long int * out ) {
    109109        long long int StartTime, EndTime;
    110110
     
    120120}
    121121
    122 void side1B( mon_t * mutex a ) {
     122void side1B( mon_t & mutex a ) {
    123123        for( int i = 0;; i++ ) {
    124124                signal(&cond1b);
     
    128128}
    129129
    130 void main( thrd1a * this ) { side1A( &mon1, this->out ); }
    131 void main( thrd1b * this ) { side1B( &mon1 ); }
     130void main( thrd1a & this ) { side1A( mon1, this.out ); }
     131void main( thrd1b & this ) { side1B( mon1 ); }
    132132
    133133long long int measure_1_sched_int() {
     
    150150thread thrd2b {};
    151151
    152 void ?{}( thrd2a * this, long long int * out ) {
    153         this->out = out;
    154 }
    155 
    156 void side2A( mon_t * mutex a, mon_t * mutex b, long long int * out ) {
     152void ?{}( thrd2a & this, long long int * out ) {
     153        this.out = out;
     154}
     155
     156void side2A( mon_t & mutex a, mon_t & mutex b, long long int * out ) {
    157157        long long int StartTime, EndTime;
    158158
     
    168168}
    169169
    170 void side2B( mon_t * mutex a, mon_t * mutex b ) {
     170void side2B( mon_t & mutex a, mon_t & mutex b ) {
    171171        for( int i = 0;; i++ ) {
    172172                signal(&cond2b);
     
    176176}
    177177
    178 void main( thrd2a * this ) { side2A( &mon1, &mon2, this->out ); }
    179 void main( thrd2b * this ) { side2B( &mon1, &mon2 ); }
     178void main( thrd2a & this ) { side2A( mon1, mon2, this.out ); }
     179void main( thrd2b & this ) { side2B( mon1, mon2 ); }
    180180
    181181long long int measure_2_sched_int() {
Note: See TracChangeset for help on using the changeset viewer.