Changeset a6e0e4c


Ignore:
Timestamp:
Dec 11, 2020, 3:44:29 PM (4 years ago)
Author:
Fangren Yu <f37yu@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
361bf01, 6ce9a4f2
Parents:
b3a0df6 (diff), 4422579 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • Jenkins/FullBuild

    rb3a0df6 ra6e0e4c  
    88        def err = null
    99
     10        final scmVars = checkout scm
     11        final commitId = scmVars.GIT_COMMIT
     12
    1013        try {
    1114                //Wrap build to add timestamp to command line
     
    1316
    1417                        stage('Build') {
    15 
    16                                 results = [null, null]
    1718
    1819                                parallel (
     
    3132
    3233                        stage('Package') {
    33                                 build job: 'Cforall_Distribute_Ref', parameters: [string(name: 'GitRef', value: gitRefNewValue), string(name: 'Build', value: currentBuild.number)]
     34                                build job: 'Cforall_Distribute_Ref', parameters: [string(name: 'GitRef', value: commitId), string(name: 'Build', value: currentBuild.number)]
    3435                        }
    3536                }
     
    102103}
    103104
    104 //Helper routine to collect information about the git history
    105 def collect_git_info() {
    106 
    107         //create the temporary output directory in case it doesn't already exist
    108         def out_dir = pwd tmp: true
    109         sh "mkdir -p ${out_dir}"
    110 
    111         //parse git logs to find what changed
    112         dir("../Cforall_Full_Build@script") {
    113                 sh "git reflog > ${out_dir}/GIT_COMMIT"
    114         }
    115         git_reflog = readFile("${out_dir}/GIT_COMMIT")
    116         gitRefOldValue = (git_reflog =~ /moving from (.+) to (.+)/)[0][1]
    117         gitRefNewValue = (git_reflog =~ /moving from (.+) to (.+)/)[0][2]
    118 }
    119 
    120105//===========================================================================================================
    121106//Routine responsible of sending the email notification once the build is completed
  • benchmark/io/http/main.cfa

    rb3a0df6 ra6e0e4c  
    7575        address.sin_port = htons( options.socket.port );
    7676
    77         ret = bind( server_fd, (struct sockaddr *)&address, sizeof(address) );
    78         if(ret < 0) {
    79                 abort( "bind error: (%d) %s\n", (int)errno, strerror(errno) );
     77        int waited = 0;
     78        for() {
     79                ret = bind( server_fd, (struct sockaddr *)&address, sizeof(address) );
     80                if(ret < 0) {
     81                        if(errno == 98) {
     82                                if(waited == 0) {
     83                                        printf("Waiting for port\n");
     84                                } else {
     85                                        printf("\r%d", waited);
     86                                        fflush(stdout);
     87                                }
     88                                waited ++;
     89                                sleep( 1`s );
     90                                continue;
     91                        }
     92                        abort( "bind error: (%d) %s\n", (int)errno, strerror(errno) );
     93                }
     94                break;
    8095        }
    8196
  • libcfa/src/concurrency/coroutine.hfa

    rb3a0df6 ra6e0e4c  
    144144
    145145        if( unlikely(dst->context.SP == 0p) ) {
    146                 active_thread()->curr_cor = dst;
    147146                __stack_prepare(&dst->stack, 65000);
    148147                __cfactx_start(main, dst, cor, __cfactx_invoke_coroutine);
    149                 active_thread()->curr_cor = src;
    150148        }
    151149
  • libcfa/src/concurrency/io/setup.cfa

    rb3a0df6 ra6e0e4c  
    1717#define _GNU_SOURCE         /* See feature_test_macros(7) */
    1818
     19#if defined(__CFA_DEBUG__)
     20        // #define __CFA_DEBUG_PRINT_IO__
     21        // #define __CFA_DEBUG_PRINT_IO_CORE__
     22#endif
     23
    1924#include "io/types.hfa"
    2025#include "kernel.hfa"
     
    111116
    112117        void __kernel_io_startup(void) {
    113                 __cfaabi_dbg_print_safe( "Kernel : Creating EPOLL instance\n" );
     118                __cfadbg_print_safe(io_core, "Kernel : Creating EPOLL instance\n" );
    114119
    115120                iopoll.epollfd = epoll_create1(0);
     
    118123                }
    119124
    120                 __cfaabi_dbg_print_safe( "Kernel : Starting io poller thread\n" );
     125                __cfadbg_print_safe(io_core, "Kernel : Starting io poller thread\n" );
    121126
    122127                iopoll.run = true;
     
    141146                // Io polling is now fully stopped
    142147
    143                 __cfaabi_dbg_print_safe( "Kernel : IO poller stopped\n" );
     148                __cfadbg_print_safe(io_core, "Kernel : IO poller stopped\n" );
    144149        }
    145150
     
    149154                id.id = doregister(&id);
    150155                __cfaabi_tls.this_proc_id = &id;
    151                 __cfaabi_dbg_print_safe( "Kernel : IO poller thread starting\n" );
     156                __cfadbg_print_safe(io_core, "Kernel : IO poller thread starting\n" );
    152157
    153158                // Block signals to control when they arrive
     
    184189                }
    185190
    186                 __cfaabi_dbg_print_safe( "Kernel : IO poller thread stopping\n" );
     191                __cfadbg_print_safe(io_core, "Kernel : IO poller thread stopping\n" );
    187192                unregister(&id);
    188193                return 0p;
  • libcfa/src/heap.cfa

    rb3a0df6 ra6e0e4c  
    1010// Created On       : Tue Dec 19 21:58:35 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Sep  7 22:17:46 2020
    13 // Update Count     : 957
     12// Last Modified On : Fri Dec 11 07:36:34 2020
     13// Update Count     : 970
    1414//
    1515
     
    464464} // headers
    465465
     466#ifdef __CFA_DEBUG__
     467#if __SIZEOF_POINTER__ == 4
     468#define MASK 0xdeadbeef
     469#else
     470#define MASK 0xdeadbeefdeadbeef
     471#endif
     472#define STRIDE size_t
     473
     474static void * Memset( void * addr, STRIDE size ) {              // debug only
     475        if ( size % sizeof(STRIDE) != 0 ) abort( "Memset() : internal error, size %zd not multiple of %zd.", size, sizeof(STRIDE) );
     476        if ( (STRIDE)addr % sizeof(STRIDE) != 0 ) abort( "Memset() : internal error, addr %p not multiple of %zd.", addr, sizeof(STRIDE) );
     477
     478        STRIDE * end = (STRIDE *)addr + size / sizeof(STRIDE);
     479        for ( STRIDE * p = (STRIDE *)addr; p < end; p += 1 ) *p = MASK;
     480        return addr;
     481} // Memset
     482#endif // __CFA_DEBUG__
     483
    466484#define NO_MEMORY_MSG "insufficient heap memory available for allocating %zd new bytes."
    467485
     
    483501                #ifdef __CFA_DEBUG__
    484502                // Set new memory to garbage so subsequent uninitialized usages might fail.
    485                 memset( (char *)heapEnd + heapRemaining, '\377', increase );
     503                //memset( (char *)heapEnd + heapRemaining, '\377', increase );
     504                Memset( (char *)heapEnd + heapRemaining, increase );
    486505                #endif // __CFA_DEBUG__
    487506                rem = heapRemaining + increase - size;
     
    557576                #ifdef __CFA_DEBUG__
    558577                // Set new memory to garbage so subsequent uninitialized usages might fail.
    559                 memset( block, '\377', tsize );
     578                //memset( block, '\377', tsize );
     579                Memset( block, tsize );
    560580                #endif // __CFA_DEBUG__
    561581                block->header.kind.real.blockSize = tsize;              // storage size for munmap
     
    606626                #ifdef __CFA_DEBUG__
    607627                // Set free memory to garbage so subsequent usages might fail.
    608                 memset( ((HeapManager.Storage *)header)->data, '\377', freeElem->blockSize - sizeof( HeapManager.Storage ) );
     628                //memset( ((HeapManager.Storage *)header)->data, '\377', freeElem->blockSize - sizeof( HeapManager.Storage ) );
     629                Memset( ((HeapManager.Storage *)header)->data, freeElem->blockSize - sizeof( HeapManager.Storage ) );
    609630                #endif // __CFA_DEBUG__
    610631
     
    935956                        header->kind.real.size = size;                          // reset allocation size
    936957                        if ( unlikely( ozfill ) && size > osize ) {     // previous request zero fill and larger ?
    937                                 memset( (char *)oaddr + osize, (int)'\0', size - osize ); // initialize added storage
     958                                memset( (char *)oaddr + osize, '\0', size - osize ); // initialize added storage
    938959                        } // if
    939960                        return oaddr;
     
    960981                        header->kind.real.blockSize |= 2;                       // mark new request as zero filled
    961982                        if ( size > osize ) {                                           // previous request larger ?
    962                                 memset( (char *)naddr + osize, (int)'\0', size - osize ); // initialize added storage
     983                                memset( (char *)naddr + osize, '\0', size - osize ); // initialize added storage
    963984                        } // if
    964985                } // if
     
    13271348                header->kind.real.blockSize |= 2;                               // mark new request as zero filled
    13281349                if ( size > osize ) {                                                   // previous request larger ?
    1329                         memset( (char *)naddr + osize, (int)'\0', size - osize ); // initialize added storage
     1350                        memset( (char *)naddr + osize, '\0', size - osize ); // initialize added storage
    13301351                } // if
    13311352        } // if
Note: See TracChangeset for help on using the changeset viewer.