/
usr
/
share
/
systemtap
/
runtime
/
dyninst
/
/usr/share/systemtap/runtime/dyninst
mkdir
upload
Name
Size
Mode
Actions
addr-map.c
565
0644
edit
dl
rm
alloc.c
1188
0644
edit
dl
rm
arith.c
2291
0644
edit
dl
rm
common_session_state.h
6921
0644
edit
dl
rm
copy.c
4095
0644
edit
dl
rm
debug.h
413
0644
edit
dl
rm
ilog2.h
2943
0644
edit
dl
rm
io.c
4541
0644
edit
dl
rm
linux_defs.h
5602
0644
edit
dl
rm
linux_hash.h
1877
0644
edit
dl
rm
linux_types.h
654
0644
edit
dl
rm
loc2c-runtime.h
2494
0644
edit
dl
rm
map_list.h
1059
0644
edit
dl
rm
map_runtime.h
5160
0644
edit
dl
rm
namespaces.h
0
0644
edit
dl
rm
offptr.h
4788
0644
edit
dl
rm
offset_list.h
4428
0644
edit
dl
rm
perf.c
0
0644
edit
dl
rm
print.c
2700
0644
edit
dl
rm
probe_lock.h
1849
0644
edit
dl
rm
regs.c
2557
0644
edit
dl
rm
runtime.h
10292
0644
edit
dl
rm
runtime_context.h
6556
0644
edit
dl
rm
runtime_defines.h
280
0644
edit
dl
rm
session_attributes.c
1717
0644
edit
dl
rm
session_attributes.h
772
0644
edit
dl
rm
shm.c
6171
0644
edit
dl
rm
stapdyn.h
4617
0644
edit
dl
rm
stat_runtime.h
1832
0644
edit
dl
rm
sym.c
1621
0644
edit
dl
rm
task_finder.c
0
0644
edit
dl
rm
timer.c
2770
0644
edit
dl
rm
transport.c
31128
0644
edit
dl
rm
transport.h
3968
0644
edit
dl
rm
unwind.c
0
0644
edit
dl
rm
uprobes-regs.c
3163
0644
edit
dl
rm
uprobes.c
1798
0644
edit
dl
rm
uprobes.h
953
0644
edit
dl
rm
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_ */
Save
cmd:
run