/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/stat_runtime.h (1832B)
/* -*- linux-c -*- * Stat Runtime Functions * Copyright (C) 2012 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_STAT_RUNTIME_H_ #define _STAPDYN_STAT_RUNTIME_H_ #include #include #include #include "offptr.h" #define STAT_LOCK(sd) do {} while (0) #define STAT_UNLOCK(sd) do {} while (0) static int STAT_GET_CPU(void) { return _stp_runtime_get_data_index(); } #define STAT_PUT_CPU() do {} while (0) /** Stat struct. Maps do not need this */ typedef struct _Stat { struct _Hist hist; /* aggregated data */ offptr_t oagg; /* The stat data is a "per-cpu" array. */ offptr_t osd[]; } *Stat; static Stat _stp_stat_alloc(size_t stat_data_size) { int i; void *mem; Stat st; size_t stat_size = sizeof(struct _Stat) + sizeof(offptr_t) * _stp_runtime_num_contexts; size_t total_size = stat_size + stat_data_size * (_stp_runtime_num_contexts + 1); if (stat_data_size < sizeof(stat_data)) return NULL; /* NB: This is done as one big allocation, then assigning offptrs to * each sub-piece. (See _stp_pmap_new for more explanation) */ st = mem = _stp_shm_zalloc(total_size); if (st == NULL) return NULL; mem += stat_size; offptr_set(&st->oagg, mem); for_each_possible_cpu(i) { mem += stat_data_size; offptr_set(&st->osd[i], mem); } return st; } static void _stp_stat_free(Stat st) { _stp_shm_free(st); } static inline stat_data* _stp_stat_get_agg(Stat st) { return offptr_get(&st->oagg); } static inline stat_data* _stp_stat_per_cpu_ptr(Stat st, int cpu) { return offptr_get(&st->osd[cpu]); } #endif /* _STAPDYN_STAT_RUNTIME_H_ */