/
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/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 <pthread.h> #include <unistd.h> #include <sched.h> #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_ */
Save
cmd:
run