/usr/share/systemtap/runtime/dyninst
NameSizeModeActions
addr-map.c5650644editdlrm
alloc.c11880644editdlrm
arith.c22910644editdlrm
common_session_state.h69210644editdlrm
copy.c40950644editdlrm
debug.h4130644editdlrm
ilog2.h29430644editdlrm
io.c45410644editdlrm
linux_defs.h56020644editdlrm
linux_hash.h18770644editdlrm
linux_types.h6540644editdlrm
loc2c-runtime.h24940644editdlrm
map_list.h10590644editdlrm
map_runtime.h51600644editdlrm
namespaces.h00644editdlrm
offptr.h47880644editdlrm
offset_list.h44280644editdlrm
perf.c00644editdlrm
print.c27000644editdlrm
probe_lock.h18490644editdlrm
regs.c25570644editdlrm
runtime.h102920644editdlrm
runtime_context.h65560644editdlrm
runtime_defines.h2800644editdlrm
session_attributes.c17170644editdlrm
session_attributes.h7720644editdlrm
shm.c61710644editdlrm
stapdyn.h46170644editdlrm
stat_runtime.h18320644editdlrm
sym.c16210644editdlrm
task_finder.c00644editdlrm
timer.c27700644editdlrm
transport.c311280644editdlrm
transport.h39680644editdlrm
unwind.c00644editdlrm
uprobes-regs.c31630644editdlrm
uprobes.c17980644editdlrm
uprobes.h9530644editdlrm
Edit: /usr/share/systemtap/runtime/dyninst/print.c (2700B)
/* -*- linux-c -*- * Print Functions * Copyright (C) 2012-2018 Red Hat Inc. * * This file is part of systemtap, and is free software. You can * redistribute it and/or modify it under the terms of the GNU General * Public License (GPL); either version 2, or (at your option) any * later version. */ #ifndef _STAPDYN_PRINT_C_ #define _STAPDYN_PRINT_C_ #ifdef STP_BULKMODE #error "Bulk mode output (percpu files) not supported for --runtime=dyninst" #endif #include "transport.c" #include "vsprintf.c" static void _stp_print_kernel_info(char *sname, char *vstr, int ctx, int num_probes) { // nah... } static int _stp_print_init(void) { /* Since 'print_buf' is now in the context structure (see * common_probe_context.h), there isn't anything to do for * regular print buffers. */ return 0; } static void _stp_print_cleanup(void) { /* Since 'print_buf' is now in the context structure (see * common_probe_context.h), there isn't anything to free for * it. */ } static inline void _stp_print_flush(void) { _stp_dyninst_transport_write(); return; } static void * _stp_reserve_bytes (int numbytes) { return _stp_dyninst_transport_reserve_bytes(numbytes); } #ifndef STP_MAXBINARYARGS #define STP_MAXBINARYARGS 127 #endif static void _stp_unreserve_bytes (int numbytes) { _stp_dyninst_transport_unreserve_bytes(numbytes); return; } /** Write 64-bit args directly into the output stream. * This function takes a variable number of 64-bit arguments * and writes them directly into the output stream. Marginally faster * than doing the same in _stp_vsnprintf(). * @sa _stp_vsnprintf() */ static void _stp_print_binary (int num, ...) { va_list vargs; int i; int64_t *args; if (unlikely(num > STP_MAXBINARYARGS)) num = STP_MAXBINARYARGS; args = _stp_reserve_bytes(num * sizeof(int64_t)); if (likely(args != NULL)) { va_start(vargs, num); for (i = 0; i < num; i++) { args[i] = va_arg(vargs, int64_t); } va_end(vargs); } } static void _stp_printf (const char *fmt, ...) { va_list args; va_start(args, fmt); _stp_vsnprintf(NULL, 0, fmt, args); va_end(args); } static void _stp_print (const char *str) { _stp_printf("%s", str); } static void _stp_print_char (const char c) { char *p = _stp_reserve_bytes(1);; if (p) { *p = c; } } /* libdw includes stdbool.h which defines bool as _Bool which clashes with * stap definition of _stp_print_trylock_irqsave. */ #undef bool /* no-op stub synchronization */ static bool _stp_print_trylock_irqsave(unsigned long *flags) { (void) flags; return true; } static void _stp_print_unlock_irqrestore(unsigned long *flags) { (void) flags; } #endif /* _STAPDYN_PRINT_C_ */