Changes in / [6e2b04e:55422cf]


Ignore:
Files:
3 deleted
17 edited

Legend:

Unmodified
Added
Removed
  • benchmark/io/http/Makefile.am

    r6e2b04e r55422cf  
    2121include $(top_srcdir)/tools/build/cfa.make
    2222
    23 AM_CFLAGS = -O3 -Wall -Wextra -I$(srcdir) -lrt -pthread -g # -Werror
     23AM_CFLAGS = -O3 -Wall -Wextra -I$(srcdir) -lrt -pthread # -Werror
    2424AM_CFAFLAGS = -quiet -nodebug
    2525AM_LDFLAGS = -quiet -nodebug
     
    3939        protocol.cfa \
    4040        protocol.hfa \
    41         socket.cfa \
    42         socket.hfa \
    4341        worker.cfa \
    4442        worker.hfa
  • benchmark/io/http/main.cfa

    r6e2b04e r55422cf  
    22
    33#include <errno.h>
    4 #include <signal.h>
    54#include <stdio.h>
    65#include <string.h>
     
    98        #include <sched.h>
    109        #include <signal.h>
    11         #include <sys/eventfd.h>
    1210        #include <sys/socket.h>
    1311        #include <netinet/in.h>
     
    1614#include <fstream.hfa>
    1715#include <kernel.hfa>
    18 #include <locks.hfa>
    1916#include <iofwd.hfa>
    2017#include <stats.hfa>
     
    2421#include "filecache.hfa"
    2522#include "options.hfa"
    26 #include "socket.hfa"
    2723#include "worker.hfa"
    2824
     
    4036        Worker * workers;
    4137        int worker_cnt;
    42         condition_variable(fast_block_lock) var;
    4338};
    4439
     
    5954                or else {}
    6055
    61                 wait(this.var, 10`s);
     56                sleep(10`s);
    6257
    6358                print_stats_now( *active_cluster(), CFA_STATS_READY_Q | CFA_STATS_IO );
     
    182177
    183178//=============================================================================================
    184 // Termination
    185 //=============================================================================================
    186 
    187 int closefd;
    188 void cleanstop(int) {
    189         eventfd_t buffer = 1;
    190         char * buffer_s = (char*)&buffer;
    191         int ret = write(closefd, buffer_s, sizeof(buffer));
    192         if(ret < 0) abort( "eventfd write error: (%d) %s\n", (int)errno, strerror(errno) );
    193         return;
    194 }
    195 
    196 //=============================================================================================
    197179// Main
    198180//============================================================================================='
    199181int main( int argc, char * argv[] ) {
    200         int ret;
    201182        __sighandler_t s = 1p;
    202183        signal(SIGPIPE, s);
     
    205186        // Parse args
    206187        parse_options(argc, argv);
    207 
    208         //===================
    209         // Setup non-interactive termination
    210         if(!options.interactive) {
    211                 closefd = eventfd(0, 0);
    212                 if(closefd < 0) abort( "eventfd error: (%d) %s\n", (int)errno, strerror(errno) );
    213 
    214                 sighandler_t prev = signal(SIGTERM, cleanstop);
    215                 intptr_t prev_workaround = (intptr_t) prev;
    216                 // can't use SIG_ERR it crashes the compiler
    217                 if(prev_workaround == -1) abort( "signal setup error: (%d) %s\n", (int)errno, strerror(errno) );
    218 
    219                 sout | "Signal termination ready";
    220         }
    221188
    222189        //===================
     
    230197        // Open Socket
    231198        sout | getpid() | ": Listening on port" | options.socket.port;
    232 
     199        int server_fd = socket(AF_INET, SOCK_STREAM, 0);
     200        if(server_fd < 0) {
     201                abort( "socket error: (%d) %s\n", (int)errno, strerror(errno) );
     202        }
     203
     204        int ret = 0;
    233205        struct sockaddr_in address;
    234         int addrlen = prepaddr(address);
    235 
    236         int server_fd;
    237         if(!options.socket.manyreuse) {
    238                 server_fd = listener(address, addrlen);
     206        int addrlen = sizeof(address);
     207        memset( (char *)&address, '\0' );
     208        address.sin_family = AF_INET;
     209        address.sin_addr.s_addr = htonl(INADDR_ANY);
     210        address.sin_port = htons( options.socket.port );
     211
     212        int waited = 0;
     213        for() {
     214                int sockfd = server_fd;
     215                __CONST_SOCKADDR_ARG addr;
     216                addr.__sockaddr__ = (struct sockaddr *)&address;
     217                socklen_t addrlen = sizeof(address);
     218                ret = bind( sockfd, addr, addrlen );
     219                if(ret < 0) {
     220                        if(errno == EADDRINUSE) {
     221                                if(waited == 0) {
     222                                        if(!options.interactive) abort | "Port already in use in non-interactive mode. Aborting";
     223                                        sout | "Waiting for port";
     224                                } else {
     225                                        sout | "\r" | waited | nonl;
     226                                        flush( sout );
     227                                }
     228                                waited ++;
     229                                sleep( 1`s );
     230                                continue;
     231                        }
     232                        abort( "bind error: (%d) %s\n", (int)errno, strerror(errno) );
     233                }
     234                break;
     235        }
     236
     237        ret = listen( server_fd, options.socket.backlog );
     238        if(ret < 0) {
     239                abort( "listen error: (%d) %s\n", (int)errno, strerror(errno) );
    239240        }
    240241
     
    256257
    257258                {
    258                         // Stats printer makes a copy so this needs to persist longer than normal
    259                         Worker * workers;
    260259                        ServerCluster cl[options.clopts.nclusters];
    261260
    262261                        init_protocol();
    263262                        {
    264                                 workers = anew(options.clopts.nworkers);
     263                                Worker * workers = anew(options.clopts.nworkers);
    265264                                cl[0].prnt->workers = workers;
    266265                                cl[0].prnt->worker_cnt = options.clopts.nworkers;
     
    274273                                                workers[i].pipe[0] = fds[pipe_off + (i * 2) + 0];
    275274                                                workers[i].pipe[1] = fds[pipe_off + (i * 2) + 1];
    276                                                 workers[i].sockfd  = options.socket.manyreuse ?  listener(address, addrlen) : server_fd;
     275                                                workers[i].sockfd  = server_fd;
    277276                                                workers[i].addr    = (struct sockaddr *)&address;
    278277                                                workers[i].addrlen = (socklen_t*)&addrlen;
     
    286285                                }
    287286                                sout | nl;
     287                                if(!options.interactive) park();
    288288                                {
    289                                         if(options.interactive) {
    290                                                 char buffer[128];
    291                                                 for() {
    292                                                         int ret = cfa_read(0, buffer, 128, 0);
    293                                                         if(ret == 0) break;
    294                                                         if(ret < 0) abort( "main read error: (%d) %s\n", (int)errno, strerror(errno) );
    295                                                         sout | "User wrote '" | "" | nonl;
    296                                                         write(sout, buffer, ret - 1);
    297                                                         sout | "'";
    298                                                 }
    299                                         }
    300                                         else {
    301                                                 char buffer[sizeof(eventfd_t)];
    302                                                 int ret = cfa_read(closefd, buffer, sizeof(eventfd_t), 0);
     289                                        char buffer[128];
     290                                        for() {
     291                                                int ret = cfa_read(0, buffer, 128, 0);
     292                                                if(ret == 0) break;
    303293                                                if(ret < 0) abort( "main read error: (%d) %s\n", (int)errno, strerror(errno) );
     294                                                sout | "User wrote '" | "" | nonl;
     295                                                write(sout, buffer, ret - 1);
     296                                                sout | "'";
    304297                                        }
    305298
     
    314307
    315308                                sout | "Shutting down socket..." | nonl; flush( sout );
    316                                 if(options.socket.manyreuse) {
    317                                         for(i; options.clopts.nworkers) {
    318                                                 ret = shutdown( workers[i].sockfd, SHUT_RD );
    319                                                 if(ret < 0) abort( "close socket %d error: (%d) %s\n", i, (int)errno, strerror(errno) );
    320                                         }
    321                                 }
    322                                 else {
    323                                         ret = shutdown( server_fd, SHUT_RD );
    324                                         if( ret < 0 ) {
    325                                                 abort( "shutdown error: (%d) %s\n", (int)errno, strerror(errno) );
    326                                         }
     309                                int ret = shutdown( server_fd, SHUT_RD );
     310                                if( ret < 0 ) {
     311                                        abort( "shutdown error: (%d) %s\n", (int)errno, strerror(errno) );
    327312                                }
    328313                                sout | "done";
     
    331316                                // Close Socket
    332317                                sout | "Closing Socket..." | nonl; flush( sout );
    333                                 if(options.socket.manyreuse) {
    334                                         for(i; options.clopts.nworkers) {
    335                                                 ret = close(workers[i].sockfd);
    336                                                 if(ret < 0) abort( "close socket %d error: (%d) %s\n", i, (int)errno, strerror(errno) );
    337                                         }
    338                                 }
    339                                 else {
    340                                         ret = close( server_fd );
    341                                         if(ret < 0) {
    342                                                 abort( "close socket error: (%d) %s\n", (int)errno, strerror(errno) );
    343                                         }
     318                                ret = close( server_fd );
     319                                if(ret < 0) {
     320                                        abort( "close socket error: (%d) %s\n", (int)errno, strerror(errno) );
    344321                                }
    345322                                sout | "done";
    346323
    347324                                sout | "Stopping connection threads..." | nonl; flush( sout );
    348                                 for(i; options.clopts.nworkers) {
    349                                         for(j; 2) {
    350                                                 ret = close(workers[i].pipe[j]);
    351                                                 if(ret < 0) abort( "close pipe %d error: (%d) %s\n", j, (int)errno, strerror(errno) );
    352                                         }
    353                                         join(workers[i]);
    354                                 }
     325                                adelete(workers);
    355326                        }
    356327                        sout | "done";
     
    360331                        sout | "done";
    361332
    362                         sout | "Stopping printer threads..." | nonl; flush( sout );
    363                         for(i; options.clopts.nclusters) {
    364                                 StatsPrinter * p = cl[i].prnt;
    365                                 if(p) {
    366                                         notify_one(p->var);
    367                                         join(*p);
    368                                 }
    369                         }
    370                         sout | "done";
    371 
    372                         // Now that the stats printer is stopped, we can reclaim this
    373                         adelete(workers);
    374 
    375333                        sout | "Stopping processors/clusters..." | nonl; flush( sout );
    376334                }
    377335                sout | "done";
    378336
    379                 // sout | "Closing splice fds..." | nonl; flush( sout );
    380                 // for(i; pipe_cnt) {
    381                 //      ret = close( fds[pipe_off + i] );
    382                 //      if(ret < 0) {
    383                 //              abort( "close pipe error: (%d) %s\n", (int)errno, strerror(errno) );
    384                 //      }
    385                 // }
     337                sout | "Closing splice fds..." | nonl; flush( sout );
     338                for(i; pipe_cnt) {
     339                        ret = close( fds[pipe_off + i] );
     340                        if(ret < 0) {
     341                                abort( "close pipe error: (%d) %s\n", (int)errno, strerror(errno) );
     342                        }
     343                }
    386344                free(fds);
    387345                sout | "done";
  • benchmark/io/http/options.cfa

    r6e2b04e r55422cf  
    3535
    3636        { // socket
    37                 8080,  // port
    38                 10,    // backlog
    39                 1024,  // buflen
    40                 false, // onereuse
    41                 false  // manyreuse
     37                8080, // port
     38                10,   // backlog
     39                1024  // buflen
    4240        },
    4341
     
    7270                {'\0', "shell",          "Disable interactive mode", options.interactive, parse_setfalse},
    7371                {'\0', "accept-backlog", "Maximum number of pending accepts", options.socket.backlog},
    74                 {'\0', "reuseport-one",  "Create a single listen socket with SO_REUSEPORT", options.socket.onereuse, parse_settrue},
    75                 {'\0', "reuseport",      "Use many listen sockets with SO_REUSEPORT", options.socket.manyreuse, parse_settrue},
    7672                {'\0', "request_len",    "Maximum number of bytes in the http request, requests with more data will be answered with Http Code 414", options.socket.buflen},
    7773                {'\0', "seed",           "seed to use for hashing", options.file_cache.hash_seed },
  • benchmark/io/http/options.hfa

    r6e2b04e r55422cf  
    2727                int backlog;
    2828                int buflen;
    29                 bool onereuse;
    30                 bool manyreuse;
    3129        } socket;
    3230
  • benchmark/io/http/worker.cfa

    r6e2b04e r55422cf  
    4343        /* paranoid */ assert( this.pipe[0] != -1 );
    4444        /* paranoid */ assert( this.pipe[1] != -1 );
    45 
    46         const bool reuse = options.socket.manyreuse;
    4745
    4846        CONNECTION:
  • libcfa/src/concurrency/io.cfa

    r6e2b04e r55422cf  
    159159
    160160                const __u32 mask = *ctx->cq.mask;
    161                 const __u32 num  = *ctx->cq.num;
    162161                unsigned long long ts_prev = ctx->cq.ts;
    163                 unsigned long long ts_next;
    164 
    165                 // We might need to do this multiple times if more events completed than can fit in the queue.
    166                 for() {
    167                         // re-read the head and tail in case it already changed.
    168                         const __u32 head = *ctx->cq.head;
    169                         const __u32 tail = *ctx->cq.tail;
    170                         const __u32 count = tail - head;
    171                         __STATS__( false, io.calls.drain++; io.calls.completed += count; )
    172 
    173                         for(i; count) {
    174                                 unsigned idx = (head + i) & mask;
    175                                 volatile struct io_uring_cqe & cqe = ctx->cq.cqes[idx];
    176 
    177                                 /* paranoid */ verify(&cqe);
    178 
    179                                 struct io_future_t * future = (struct io_future_t *)(uintptr_t)cqe.user_data;
    180                                 // __cfadbg_print_safe( io, "Kernel I/O : Syscall completed : cqe %p, result %d for %p\n", &cqe, cqe.res, future );
    181 
    182                                 __kernel_unpark( fulfil( *future, cqe.res, false ), UNPARK_LOCAL );
    183                         }
    184 
    185                         ts_next = ctx->cq.ts = rdtscl();
    186 
    187                         // Mark to the kernel that the cqe has been seen
    188                         // Ensure that the kernel only sees the new value of the head index after the CQEs have been read.
    189                         __atomic_store_n( ctx->cq.head, head + count, __ATOMIC_SEQ_CST );
    190                         ctx->proc->idle_wctx.drain_time = ts_next;
    191 
    192                         if(likely(count < num)) break;
    193 
    194                         ioring_syscsll( *ctx, 0, IORING_ENTER_GETEVENTS);
    195                 }
     162
     163                // re-read the head and tail in case it already changed.
     164                const __u32 head = *ctx->cq.head;
     165                const __u32 tail = *ctx->cq.tail;
     166                const __u32 count = tail - head;
     167                __STATS__( false, io.calls.drain++; io.calls.completed += count; )
     168
     169                for(i; count) {
     170                        unsigned idx = (head + i) & mask;
     171                        volatile struct io_uring_cqe & cqe = ctx->cq.cqes[idx];
     172
     173                        /* paranoid */ verify(&cqe);
     174
     175                        struct io_future_t * future = (struct io_future_t *)(uintptr_t)cqe.user_data;
     176                        // __cfadbg_print_safe( io, "Kernel I/O : Syscall completed : cqe %p, result %d for %p\n", &cqe, cqe.res, future );
     177
     178                        __kernel_unpark( fulfil( *future, cqe.res, false ), UNPARK_LOCAL );
     179                }
     180
     181                unsigned long long ts_next = ctx->cq.ts = rdtscl();
     182
     183                // Mark to the kernel that the cqe has been seen
     184                // Ensure that the kernel only sees the new value of the head index after the CQEs have been read.
     185                __atomic_store_n( ctx->cq.head, head + count, __ATOMIC_SEQ_CST );
     186                ctx->proc->idle_wctx.drain_time = ts_next;
    196187
    197188                __cfadbg_print_safe(io, "Kernel I/O : %u completed age %llu\n", count, ts_next);
  • libcfa/src/concurrency/io/setup.cfa

    r6e2b04e r55422cf  
    138138                __u32 nentries = params_in.num_entries != 0 ? params_in.num_entries : 256;
    139139                if( !is_pow2(nentries) ) {
    140                         abort("ERROR: I/O setup 'num_entries' must be a power of 2, was %u\n", nentries);
     140                        abort("ERROR: I/O setup 'num_entries' must be a power of 2\n");
    141141                }
    142142
  • src/Concurrency/Waitfor.cc

    r6e2b04e r55422cf  
    5656                      |  |
    5757                      |  |
    58                       |  |
     58                            |  |
    5959                      |  |
    6060                      |  |
  • src/Concurrency/Waitfor.h

    r6e2b04e r55422cf  
    1919
    2020class Declaration;
    21 namespace ast {
    22         class TranslationUnit;
    23 }
    2421
    2522namespace Concurrency {
    2623        void generateWaitFor( std::list< Declaration * > & translationUnit );
    27 
    28 void generateWaitFor( ast::TranslationUnit & translationUnit );
    2924};
    3025
  • src/Concurrency/module.mk

    r6e2b04e r55422cf  
    1919        Concurrency/Keywords.cc \
    2020        Concurrency/Keywords.h \
    21         Concurrency/WaitforNew.cpp \
    2221        Concurrency/Waitfor.cc \
    2322        Concurrency/Waitfor.h
  • src/InitTweak/FixGlobalInit.cc

    r6e2b04e r55422cf  
    162162                        } // if
    163163                        if ( Statement * ctor = ctorInit->ctor ) {
    164                                 addDataSectionAttribute( objDecl );
     164                                addDataSectonAttribute( objDecl );
    165165                                initStatements.push_back( ctor );
    166166                                objDecl->init = nullptr;
  • src/InitTweak/FixInit.cc

    r6e2b04e r55422cf  
    806806                                                // The attribute works, and is meant to apply, both for leaving the static local alone,
    807807                                                // and for hoisting it out as a static global.
    808                                                 addDataSectionAttribute( objDecl );
     808                                                addDataSectonAttribute( objDecl );
    809809
    810810                                                // originally wanted to take advantage of gcc nested functions, but
  • src/InitTweak/InitTweak.cc

    r6e2b04e r55422cf  
    587587
    588588        bool isConstructable( const ast::Type * type ) {
    589                 return ! dynamic_cast< const ast::VarArgsType * >( type ) && ! dynamic_cast< const ast::ReferenceType * >( type )
     589                return ! dynamic_cast< const ast::VarArgsType * >( type ) && ! dynamic_cast< const ast::ReferenceType * >( type ) 
    590590                && ! dynamic_cast< const ast::FunctionType * >( type ) && ! Tuples::isTtype( type );
    591591        }
     
    10251025                if (!assign) {
    10261026                        auto td = new ast::TypeDecl({}, "T", {}, nullptr, ast::TypeDecl::Dtype, true);
    1027                         assign = new ast::FunctionDecl({}, "?=?", {},
     1027                        assign = new ast::FunctionDecl({}, "?=?", {}, 
    10281028                        { new ast::ObjectDecl({}, "_dst", new ast::ReferenceType(new ast::TypeInstType("T", td))),
    10291029                          new ast::ObjectDecl({}, "_src", new ast::TypeInstType("T", td))},
     
    10951095
    10961096                        // address of a variable or member expression is constexpr
    1097                         if ( ! dynamic_cast< const ast::NameExpr * >( arg )
    1098                         && ! dynamic_cast< const ast::VariableExpr * >( arg )
    1099                         && ! dynamic_cast< const ast::MemberExpr * >( arg )
     1097                        if ( ! dynamic_cast< const ast::NameExpr * >( arg ) 
     1098                        && ! dynamic_cast< const ast::VariableExpr * >( arg ) 
     1099                        && ! dynamic_cast< const ast::MemberExpr * >( arg ) 
    11001100                        && ! dynamic_cast< const ast::UntypedMemberExpr * >( arg ) ) result = false;
    11011101                }
     
    12411241        }
    12421242
    1243         #if defined( __x86_64 ) || defined( __i386 ) // assembler comment to prevent assembler warning message
    1244                 #define ASM_COMMENT "#"
    1245         #else // defined( __ARM_ARCH )
    1246                 #define ASM_COMMENT "//"
    1247         #endif
    1248         static const char * const data_section =  ".data" ASM_COMMENT;
    1249         static const char * const tlsd_section = ".tdata" ASM_COMMENT;
    1250         void addDataSectionAttribute( ObjectDecl * objDecl ) {
    1251                 const bool is_tls = objDecl->get_storageClasses().is_threadlocal;
    1252                 const char * section = is_tls ? tlsd_section : data_section;
     1243        void addDataSectonAttribute( ObjectDecl * objDecl ) {
    12531244                objDecl->attributes.push_back(new Attribute("section", {
    1254                         new ConstantExpr( Constant::from_string( section ) )
    1255                 }));
     1245                        new ConstantExpr( Constant::from_string(".data"
     1246#if defined( __x86_64 ) || defined( __i386 ) // assembler comment to prevent assembler warning message
     1247                                        "#"
     1248#else // defined( __ARM_ARCH )
     1249                                        "//"
     1250#endif
     1251                                ))}));
    12561252        }
    12571253
    12581254        void addDataSectionAttribute( ast::ObjectDecl * objDecl ) {
    1259                 const bool is_tls = objDecl->storage.is_threadlocal;
    1260                 const char * section = is_tls ? tlsd_section : data_section;
    12611255                objDecl->attributes.push_back(new ast::Attribute("section", {
    1262                         ast::ConstantExpr::from_string(objDecl->location, section)
    1263                 }));
     1256                        ast::ConstantExpr::from_string(objDecl->location, ".data"
     1257#if defined( __x86_64 ) || defined( __i386 ) // assembler comment to prevent assembler warning message
     1258                                        "#"
     1259#else // defined( __ARM_ARCH )
     1260                                        "//"
     1261#endif
     1262                                )}));
    12641263        }
    12651264
  • src/InitTweak/InitTweak.h

    r6e2b04e r55422cf  
    127127        ///    .section .data#,"a"
    128128        /// to avoid assembler warning "ignoring changed section attributes for .data"
    129         void addDataSectionAttribute( ObjectDecl * objDecl );
     129        void addDataSectonAttribute( ObjectDecl * objDecl );
    130130
    131131        void addDataSectionAttribute( ast::ObjectDecl * objDecl );
  • src/main.cc

    r6e2b04e r55422cf  
    1010// Created On       : Fri May 15 23:12:02 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Tue Jun  7 13:29:00 2022
    13 // Update Count     : 674
     12// Last Modified On : Fri Apr 29  9:52:00 2022
     13// Update Count     : 673
    1414//
    1515
     
    447447                        PASS( "Expand Unique Expr", Tuples::expandUniqueExpr( transUnit ) ); // xxx - is this the right place for this? want to expand ASAP so tha, sequent passes don't need to worry about double-visiting a unique expr - needs to go after InitTweak::fix so that copy constructed return declarations are reused
    448448
    449                         PASS( "Translate Tries", ControlStruct::translateTries( transUnit ) );
    450                         PASS( "Gen Waitfor", Concurrency::generateWaitFor( transUnit ) );
     449                        PASS( "Translate Tries" , ControlStruct::translateTries( transUnit ) );
    451450
    452451                        translationUnit = convert( move( transUnit ) );
     
    518517
    519518                        PASS( "Expand Unique Expr", Tuples::expandUniqueExpr( translationUnit ) ); // xxx - is this the right place for this? want to expand ASAP so tha, sequent passes don't need to worry about double-visiting a unique expr - needs to go after InitTweak::fix so that copy constructed return declarations are reused
    520                         PASS( "Translate Tries", ControlStruct::translateTries( translationUnit ) );
    521                         PASS( "Gen Waitfor", Concurrency::generateWaitFor( translationUnit ) );
     519
     520                        PASS( "Translate Tries" , ControlStruct::translateTries( translationUnit ) );
    522521                }
     522
     523                PASS( "Gen Waitfor" , Concurrency::generateWaitFor( translationUnit ) );
    523524
    524525                PASS( "Convert Specializations",  GenPoly::convertSpecializations( translationUnit ) ); // needs to happen before tuple types are expanded
  • tools/cfa.nanorc

    r6e2b04e r55422cf  
    1010color green "\<(forall|trait|(o|d|f|t)type|mutex|_Bool|volatile|virtual)\>"
    1111color green "\<(float|double|bool|char|int|short|long|enum|void|auto)\>"
    12 color green "\<(static|const|extern|(un)?signed|inline|sizeof|vtable)\>"
     12color green "\<(static|const|extern|(un)?signed|inline)\>" "\<(sizeof)\>"
    1313color green "\<((s?size)|one|zero|((u_?)?int(8|16|32|64|ptr)))_t\>"
    1414
    1515# Declarations
    1616color brightgreen "\<(struct|union|typedef|trait|coroutine|generator)\>"
    17 color brightgreen "\<(monitor|thread|with|exception)\>"
     17color brightgreen "\<(monitor|thread|with)\>"
    1818
    1919# Control Flow Structures
  • tools/jenkins/setup.sh.in

    r6e2b04e r55422cf  
    2929function getrunpath()
    3030{
    31         local elfout=$(readelf -d $1 | grep -E "RPATH|RUNPATH")
     31        local elfout=$(readelf -d $1 | grep "RUNPATH")
    3232        regex='\[/([[:alpha:][:digit:]@/_.-]+)\]'
    3333        if [[ $elfout =~ $regex ]]; then
     
    4343{
    4444        local deps=$(ldd $1)
     45        retsysdeps=()
    4546        retlcldeps=()
    46         retsysdeps=()
    4747        while IFS= read -r line; do
    48                 regex1='(libcfa[[:alpha:][:digit:].]+)'
    49                 regex2='/([[:alpha:][:digit:]@/_.-]+)'
     48                regex1='/([[:alpha:][:digit:]@/_.-]+)'
     49                regex2='(libcfa[[:alpha:][:digit:].]+) => not found'
    5050                regex3='linux-vdso.so.1|linux-gate.so.1'
    5151                if [[ $line =~ $regex1 ]]; then
     52                        retsysdeps+=(${BASH_REMATCH[1]})
     53                elif [[ $line =~ $regex2 ]]; then
    5254                        retlcldeps+=(${BASH_REMATCH[1]})
    53                 elif [[ $line =~ $regex2 ]]; then
    54                         retsysdeps+=(${BASH_REMATCH[1]})
    5555                elif [[ $line =~ $regex3 ]]; then
    5656                        # echo "ignoring '$line}': intrinsic"
Note: See TracChangeset for help on using the changeset viewer.