{"repo":"corelight/cwrap","free":true,"listed":false,"github":"https://github.com/corelight/cwrap","clone":"git clone https://github.com/corelight/cwrap.git","description":"Auto wrap C and C++ functions with instrumentation","language":"Perl","stars":34,"topics":["instrumentation","comprehension","debugging","tracing","performance-analysis"],"license":"MIT","category":"dev-tools","readme_excerpt":"Auto wrap C and C++ functions with instrumentation ========================= cwrap is an experimental but working software with system tests to auto wrap C and C++ functions with instrumentation for code comprehension, debugging, & light performance analysis. Supports gcc & Intel. cwrap auto instrumentation by example ----------- Clone cwrap, create example foo.c , and compile with and without cwrap: Ask cwrap compiled foo which C functions and/or C++ function variations are instrumented: Ask cwrap compiled foo to run with full verbosity with various output line prefixes, and output stats upon exit: Ask cwrap compiled foo to run but ignore verbosity until bar() is executed: Ask cwrap compiled foo to run with full verbosity except verbosity for bar() disables its output: cwrap manual instrumentation by example ----------- Manually add various cwrap macros to foo.c , and compile with and without cwrap: Notice how CWRAP PRINTF() output gets auto indented if running with cwrap verbosity enabled: If verbosity only enabled for main() then CWRAP PRINTF() 'demoted' to a regular printf() : Note: The run-time per function verbosity applies to cwrap macros as well as auto entry and exit instrumentation. Environment variables which influence cwrap at run-time ----------- - CWRAP LOG NUM=1 : Display line count on each output line. - CWRAP LOG TIMESTAMP=1 : Display elapsed seconds on each output line. - CWRAP LOG THREAD ID=1 : Display thread ID on each output line. - CWRAP LOG COR ID=1 : D","default_branch":null,"files":null,"tree":[],"storefront":"/r/corelight","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/corelight/cwrap/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}