Linux server2.hpierson.com 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
Apache
: 162.0.216.123 | : 216.73.216.152
28 Domain
?7.4.33
yvffpqmy
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
systemtap /
runtime /
dyninst /
[ HOME SHELL ]
Name
Size
Permission
Action
addr-map.c
525
B
-rw-r--r--
alloc.c
1.16
KB
-rw-r--r--
arith.c
2.24
KB
-rw-r--r--
common_session_state.h
6.76
KB
-rw-r--r--
copy.c
4
KB
-rw-r--r--
debug.h
413
B
-rw-r--r--
ilog2.h
2.87
KB
-rw-r--r--
io.c
4.43
KB
-rw-r--r--
linux_defs.h
5.58
KB
-rw-r--r--
linux_hash.h
1.83
KB
-rw-r--r--
linux_types.h
654
B
-rw-r--r--
loc2c-runtime.h
2.44
KB
-rw-r--r--
map_list.h
1.03
KB
-rw-r--r--
map_runtime.h
5.04
KB
-rw-r--r--
namespaces.h
0
B
-rw-r--r--
offptr.h
4.68
KB
-rw-r--r--
offset_list.h
4.32
KB
-rw-r--r--
perf.c
0
B
-rw-r--r--
print.c
2.37
KB
-rw-r--r--
probe_lock.h
1.81
KB
-rw-r--r--
regs.c
2.14
KB
-rw-r--r--
runtime.h
9.49
KB
-rw-r--r--
runtime_context.h
6.4
KB
-rw-r--r--
runtime_defines.h
235
B
-rw-r--r--
session_attributes.c
1.68
KB
-rw-r--r--
session_attributes.h
772
B
-rw-r--r--
shm.c
6.03
KB
-rw-r--r--
stapdyn.h
3.37
KB
-rw-r--r--
stat_runtime.h
1.79
KB
-rw-r--r--
sym.c
40
B
-rw-r--r--
task_finder.c
0
B
-rw-r--r--
timer.c
2.71
KB
-rw-r--r--
transport.c
30.4
KB
-rw-r--r--
transport.h
3.88
KB
-rw-r--r--
unwind.c
0
B
-rw-r--r--
uprobes-regs.c
1.94
KB
-rw-r--r--
uprobes.c
1.76
KB
-rw-r--r--
uprobes.h
953
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : map_runtime.h
/* -*- linux-c -*- * Map Runtime Functions * Copyright (C) 2012-2016 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_MAP_RUNTIME_H_ #define _STAPDYN_MAP_RUNTIME_H_ #include <pthread.h> #define MAP_GET_CPU() STAT_GET_CPU() #define MAP_PUT_CPU() STAT_PUT_CPU() struct pmap { int bit_shift; /* scale factor for integer arithmetic */ int stat_ops; /* related statistical operators */ offptr_t oagg; /* aggregation map */ offptr_t omap[]; /* per-cpu maps */ }; static inline MAP _stp_pmap_get_agg(PMAP p) { return offptr_get(&p->oagg); } static inline void _stp_pmap_set_agg(PMAP p, MAP agg) { offptr_set(&p->oagg, agg); } static inline MAP _stp_pmap_get_map(PMAP p, unsigned cpu) { if (cpu >= _stp_runtime_num_contexts) cpu = 0; return offptr_get(&p->omap[cpu]); } static inline void _stp_pmap_set_map(PMAP p, MAP m, unsigned cpu) { if (cpu >= _stp_runtime_num_contexts) cpu = 0; offptr_set(&p->omap[cpu], m); } static void __stp_map_del(MAP map) { } /** Deletes a map. * Deletes a map, freeing all memory in all elements. * Normally done only when the module exits. * @param map */ static void _stp_map_del(MAP map) { __stp_map_del(map); _stp_shm_free(map); } static void _stp_pmap_del(PMAP pmap) { int i; /* The pmap is one giant allocation, so do only * the basic cleanup for each map. */ for_each_possible_cpu(i) __stp_map_del(_stp_pmap_get_map (pmap, i)); __stp_map_del(_stp_pmap_get_agg(pmap)); _stp_shm_free(pmap); } static int _stp_map_init(MAP m, unsigned max_entries, unsigned hash_table_mask, int wrap, int node_size) { unsigned i; /* The node memory is allocated right after the map (incl. the hash table). */ void *node_mem = (void*)(m + 1) + sizeof(struct mhlist_head)*(hash_table_mask+1); INIT_MLIST_HEAD(&m->pool); INIT_MLIST_HEAD(&m->head); m->hash_table_mask = hash_table_mask; for (i = 0; i <= m->hash_table_mask; i++) INIT_MHLIST_HEAD(&m->hashes[i]); m->maxnum = max_entries; m->wrap = wrap; for (i = 0; i < max_entries; i++) { struct map_node *node = node_mem + i * node_size; mlist_add(&node->lnode, &m->pool); INIT_MHLIST_NODE(&node->hnode); } return 0; } /** Create a new map. * Maps must be created at module initialization time. * @param max_entries The maximum number of entries allowed. Currently that * number will be preallocated.If more entries are required, the oldest ones * will be deleted. This makes it effectively a circular buffer. * @return A MAP on success or NULL on failure. * @ingroup map_create */ static MAP _stp_map_new(unsigned max_entries, int wrap, int node_size, int cpu __attribute((unused))) { MAP m; /* NB: Allocate the map in one big chuck. * (See _stp_pmap_new for more explanation) */ unsigned hash_table_mask = HASHTABLESIZE(max_entries)-1; /* usable as bitmask */ size_t map_size = sizeof(struct map_root) + sizeof(struct mhlist_head) * (hash_table_mask+1) + node_size * max_entries; m = _stp_shm_zalloc(map_size); if (m == NULL) return NULL; if (_stp_map_init(m, max_entries, hash_table_mask, wrap, node_size)) { _stp_map_del(m); return NULL; } return m; } static PMAP _stp_pmap_new(unsigned max_entries, int wrap, int node_size) { int i; MAP m; PMAP pmap; void *map_mem; unsigned hash_table_mask = HASHTABLESIZE(max_entries)-1; /* usable as bitmask */ /* Allocate the pmap in one big chuck. * * The reason for this is that we're allocating in the shared memory * mmap, which may have to move locations in order to grow. If some * smaller unit of the pmap allocation were to cause the whole thing to * move, then we'd lose track of the prior allocations. * * Once returned from here, we'll always access the pmap via the global * shared memory base. So if other map/pmap/stat/etc. allocations * cause it to move later, that's ok. */ size_t map_size = sizeof(struct map_root) + sizeof(struct mhlist_head) * (hash_table_mask+1) + node_size * max_entries; size_t pmap_size = sizeof(struct pmap) + sizeof(offptr_t) * _stp_runtime_num_contexts; size_t total_size = pmap_size + map_size * (_stp_runtime_num_contexts + 1); map_mem = pmap = _stp_shm_zalloc(total_size); if (pmap == NULL) return NULL; map_mem += pmap_size; for_each_possible_cpu(i) _stp_pmap_set_map(pmap, NULL, i); _stp_pmap_set_agg(pmap, NULL); /* Initialize the per-cpu maps. */ for_each_possible_cpu(i) { m = map_mem; if (_stp_map_init(m, max_entries, hash_table_mask, wrap, node_size) != 0) goto err; _stp_pmap_set_map(pmap, m, i); map_mem += map_size; } /* Initialize the aggregate map. */ m = map_mem; if (_stp_map_init(m, max_entries, hash_table_mask, wrap, node_size) != 0) goto err; _stp_pmap_set_agg(pmap, m); return pmap; err: _stp_pmap_del(pmap); return NULL; } #endif /* _STAPDYN_MAP_RUNTIME_H_ */
Close