Changes in / [6e2b04e:55422cf]
- Files:
-
- 3 deleted
- 17 edited
-
benchmark/io/http/Makefile.am (modified) (2 diffs)
-
benchmark/io/http/main.cfa (modified) (15 diffs)
-
benchmark/io/http/options.cfa (modified) (2 diffs)
-
benchmark/io/http/options.hfa (modified) (1 diff)
-
benchmark/io/http/socket.cfa (deleted)
-
benchmark/io/http/socket.hfa (deleted)
-
benchmark/io/http/worker.cfa (modified) (1 diff)
-
libcfa/src/concurrency/io.cfa (modified) (1 diff)
-
libcfa/src/concurrency/io/setup.cfa (modified) (1 diff)
-
src/Concurrency/Waitfor.cc (modified) (1 diff)
-
src/Concurrency/Waitfor.h (modified) (1 diff)
-
src/Concurrency/WaitforNew.cpp (deleted)
-
src/Concurrency/module.mk (modified) (1 diff)
-
src/InitTweak/FixGlobalInit.cc (modified) (1 diff)
-
src/InitTweak/FixInit.cc (modified) (1 diff)
-
src/InitTweak/InitTweak.cc (modified) (4 diffs)
-
src/InitTweak/InitTweak.h (modified) (1 diff)
-
src/main.cc (modified) (3 diffs)
-
tools/cfa.nanorc (modified) (1 diff)
-
tools/jenkins/setup.sh.in (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
benchmark/io/http/Makefile.am
r6e2b04e r55422cf 21 21 include $(top_srcdir)/tools/build/cfa.make 22 22 23 AM_CFLAGS = -O3 -Wall -Wextra -I$(srcdir) -lrt -pthread -g# -Werror23 AM_CFLAGS = -O3 -Wall -Wextra -I$(srcdir) -lrt -pthread # -Werror 24 24 AM_CFAFLAGS = -quiet -nodebug 25 25 AM_LDFLAGS = -quiet -nodebug … … 39 39 protocol.cfa \ 40 40 protocol.hfa \ 41 socket.cfa \42 socket.hfa \43 41 worker.cfa \ 44 42 worker.hfa -
benchmark/io/http/main.cfa
r6e2b04e r55422cf 2 2 3 3 #include <errno.h> 4 #include <signal.h>5 4 #include <stdio.h> 6 5 #include <string.h> … … 9 8 #include <sched.h> 10 9 #include <signal.h> 11 #include <sys/eventfd.h>12 10 #include <sys/socket.h> 13 11 #include <netinet/in.h> … … 16 14 #include <fstream.hfa> 17 15 #include <kernel.hfa> 18 #include <locks.hfa>19 16 #include <iofwd.hfa> 20 17 #include <stats.hfa> … … 24 21 #include "filecache.hfa" 25 22 #include "options.hfa" 26 #include "socket.hfa"27 23 #include "worker.hfa" 28 24 … … 40 36 Worker * workers; 41 37 int worker_cnt; 42 condition_variable(fast_block_lock) var;43 38 }; 44 39 … … 59 54 or else {} 60 55 61 wait(this.var,10`s);56 sleep(10`s); 62 57 63 58 print_stats_now( *active_cluster(), CFA_STATS_READY_Q | CFA_STATS_IO ); … … 182 177 183 178 //============================================================================================= 184 // Termination185 //=============================================================================================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 //=============================================================================================197 179 // Main 198 180 //=============================================================================================' 199 181 int main( int argc, char * argv[] ) { 200 int ret;201 182 __sighandler_t s = 1p; 202 183 signal(SIGPIPE, s); … … 205 186 // Parse args 206 187 parse_options(argc, argv); 207 208 //===================209 // Setup non-interactive termination210 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 compiler217 if(prev_workaround == -1) abort( "signal setup error: (%d) %s\n", (int)errno, strerror(errno) );218 219 sout | "Signal termination ready";220 }221 188 222 189 //=================== … … 230 197 // Open Socket 231 198 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; 233 205 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) ); 239 240 } 240 241 … … 256 257 257 258 { 258 // Stats printer makes a copy so this needs to persist longer than normal259 Worker * workers;260 259 ServerCluster cl[options.clopts.nclusters]; 261 260 262 261 init_protocol(); 263 262 { 264 workers = anew(options.clopts.nworkers);263 Worker * workers = anew(options.clopts.nworkers); 265 264 cl[0].prnt->workers = workers; 266 265 cl[0].prnt->worker_cnt = options.clopts.nworkers; … … 274 273 workers[i].pipe[0] = fds[pipe_off + (i * 2) + 0]; 275 274 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; 277 276 workers[i].addr = (struct sockaddr *)&address; 278 277 workers[i].addrlen = (socklen_t*)&addrlen; … … 286 285 } 287 286 sout | nl; 287 if(!options.interactive) park(); 288 288 { 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; 303 293 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 | "'"; 304 297 } 305 298 … … 314 307 315 308 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) ); 327 312 } 328 313 sout | "done"; … … 331 316 // Close Socket 332 317 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) ); 344 321 } 345 322 sout | "done"; 346 323 347 324 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); 355 326 } 356 327 sout | "done"; … … 360 331 sout | "done"; 361 332 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 this373 adelete(workers);374 375 333 sout | "Stopping processors/clusters..." | nonl; flush( sout ); 376 334 } 377 335 sout | "done"; 378 336 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 } 386 344 free(fds); 387 345 sout | "done"; -
benchmark/io/http/options.cfa
r6e2b04e r55422cf 35 35 36 36 { // 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 42 40 }, 43 41 … … 72 70 {'\0', "shell", "Disable interactive mode", options.interactive, parse_setfalse}, 73 71 {'\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},76 72 {'\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}, 77 73 {'\0', "seed", "seed to use for hashing", options.file_cache.hash_seed }, -
benchmark/io/http/options.hfa
r6e2b04e r55422cf 27 27 int backlog; 28 28 int buflen; 29 bool onereuse;30 bool manyreuse;31 29 } socket; 32 30 -
benchmark/io/http/worker.cfa
r6e2b04e r55422cf 43 43 /* paranoid */ assert( this.pipe[0] != -1 ); 44 44 /* paranoid */ assert( this.pipe[1] != -1 ); 45 46 const bool reuse = options.socket.manyreuse;47 45 48 46 CONNECTION: -
libcfa/src/concurrency/io.cfa
r6e2b04e r55422cf 159 159 160 160 const __u32 mask = *ctx->cq.mask; 161 const __u32 num = *ctx->cq.num;162 161 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; 196 187 197 188 __cfadbg_print_safe(io, "Kernel I/O : %u completed age %llu\n", count, ts_next); -
libcfa/src/concurrency/io/setup.cfa
r6e2b04e r55422cf 138 138 __u32 nentries = params_in.num_entries != 0 ? params_in.num_entries : 256; 139 139 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"); 141 141 } 142 142 -
src/Concurrency/Waitfor.cc
r6e2b04e r55422cf 56 56 | | 57 57 | | 58 | |58 | | 59 59 | | 60 60 | | -
src/Concurrency/Waitfor.h
r6e2b04e r55422cf 19 19 20 20 class Declaration; 21 namespace ast {22 class TranslationUnit;23 }24 21 25 22 namespace Concurrency { 26 23 void generateWaitFor( std::list< Declaration * > & translationUnit ); 27 28 void generateWaitFor( ast::TranslationUnit & translationUnit );29 24 }; 30 25 -
src/Concurrency/module.mk
r6e2b04e r55422cf 19 19 Concurrency/Keywords.cc \ 20 20 Concurrency/Keywords.h \ 21 Concurrency/WaitforNew.cpp \22 21 Concurrency/Waitfor.cc \ 23 22 Concurrency/Waitfor.h -
src/InitTweak/FixGlobalInit.cc
r6e2b04e r55422cf 162 162 } // if 163 163 if ( Statement * ctor = ctorInit->ctor ) { 164 addDataSect ionAttribute( objDecl );164 addDataSectonAttribute( objDecl ); 165 165 initStatements.push_back( ctor ); 166 166 objDecl->init = nullptr; -
src/InitTweak/FixInit.cc
r6e2b04e r55422cf 806 806 // The attribute works, and is meant to apply, both for leaving the static local alone, 807 807 // and for hoisting it out as a static global. 808 addDataSect ionAttribute( objDecl );808 addDataSectonAttribute( objDecl ); 809 809 810 810 // originally wanted to take advantage of gcc nested functions, but -
src/InitTweak/InitTweak.cc
r6e2b04e r55422cf 587 587 588 588 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 ) 590 590 && ! dynamic_cast< const ast::FunctionType * >( type ) && ! Tuples::isTtype( type ); 591 591 } … … 1025 1025 if (!assign) { 1026 1026 auto td = new ast::TypeDecl({}, "T", {}, nullptr, ast::TypeDecl::Dtype, true); 1027 assign = new ast::FunctionDecl({}, "?=?", {}, 1027 assign = new ast::FunctionDecl({}, "?=?", {}, 1028 1028 { new ast::ObjectDecl({}, "_dst", new ast::ReferenceType(new ast::TypeInstType("T", td))), 1029 1029 new ast::ObjectDecl({}, "_src", new ast::TypeInstType("T", td))}, … … 1095 1095 1096 1096 // 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 ) 1100 1100 && ! dynamic_cast< const ast::UntypedMemberExpr * >( arg ) ) result = false; 1101 1101 } … … 1241 1241 } 1242 1242 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 ) { 1253 1244 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 ))})); 1256 1252 } 1257 1253 1258 1254 void addDataSectionAttribute( ast::ObjectDecl * objDecl ) { 1259 const bool is_tls = objDecl->storage.is_threadlocal;1260 const char * section = is_tls ? tlsd_section : data_section;1261 1255 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 )})); 1264 1263 } 1265 1264 -
src/InitTweak/InitTweak.h
r6e2b04e r55422cf 127 127 /// .section .data#,"a" 128 128 /// to avoid assembler warning "ignoring changed section attributes for .data" 129 void addDataSect ionAttribute( ObjectDecl * objDecl );129 void addDataSectonAttribute( ObjectDecl * objDecl ); 130 130 131 131 void addDataSectionAttribute( ast::ObjectDecl * objDecl ); -
src/main.cc
r6e2b04e r55422cf 10 10 // Created On : Fri May 15 23:12:02 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Tue Jun 7 13:29:00 202213 // Update Count : 67 412 // Last Modified On : Fri Apr 29 9:52:00 2022 13 // Update Count : 673 14 14 // 15 15 … … 447 447 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 448 448 449 PASS( "Translate Tries", ControlStruct::translateTries( transUnit ) ); 450 PASS( "Gen Waitfor", Concurrency::generateWaitFor( transUnit ) ); 449 PASS( "Translate Tries" , ControlStruct::translateTries( transUnit ) ); 451 450 452 451 translationUnit = convert( move( transUnit ) ); … … 518 517 519 518 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 ) ); 522 521 } 522 523 PASS( "Gen Waitfor" , Concurrency::generateWaitFor( translationUnit ) ); 523 524 524 525 PASS( "Convert Specializations", GenPoly::convertSpecializations( translationUnit ) ); // needs to happen before tuple types are expanded -
tools/cfa.nanorc
r6e2b04e r55422cf 10 10 color green "\<(forall|trait|(o|d|f|t)type|mutex|_Bool|volatile|virtual)\>" 11 11 color green "\<(float|double|bool|char|int|short|long|enum|void|auto)\>" 12 color green "\<(static|const|extern|(un)?signed|inline |sizeof|vtable)\>"12 color green "\<(static|const|extern|(un)?signed|inline)\>" "\<(sizeof)\>" 13 13 color green "\<((s?size)|one|zero|((u_?)?int(8|16|32|64|ptr)))_t\>" 14 14 15 15 # Declarations 16 16 color brightgreen "\<(struct|union|typedef|trait|coroutine|generator)\>" 17 color brightgreen "\<(monitor|thread|with |exception)\>"17 color brightgreen "\<(monitor|thread|with)\>" 18 18 19 19 # Control Flow Structures -
tools/jenkins/setup.sh.in
r6e2b04e r55422cf 29 29 function getrunpath() 30 30 { 31 local elfout=$(readelf -d $1 | grep -E "RPATH|RUNPATH")31 local elfout=$(readelf -d $1 | grep "RUNPATH") 32 32 regex='\[/([[:alpha:][:digit:]@/_.-]+)\]' 33 33 if [[ $elfout =~ $regex ]]; then … … 43 43 { 44 44 local deps=$(ldd $1) 45 retsysdeps=() 45 46 retlcldeps=() 46 retsysdeps=()47 47 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' 50 50 regex3='linux-vdso.so.1|linux-gate.so.1' 51 51 if [[ $line =~ $regex1 ]]; then 52 retsysdeps+=(${BASH_REMATCH[1]}) 53 elif [[ $line =~ $regex2 ]]; then 52 54 retlcldeps+=(${BASH_REMATCH[1]}) 53 elif [[ $line =~ $regex2 ]]; then54 retsysdeps+=(${BASH_REMATCH[1]})55 55 elif [[ $line =~ $regex3 ]]; then 56 56 # echo "ignoring '$line}': intrinsic"
Note:
See TracChangeset
for help on using the changeset viewer.