Server IP : 184.154.167.98 / Your IP : 13.59.182.74 Web Server : Apache System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 User : puertode ( 1767) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/libexec/pcp/pmdas/bcc/modules/ |
Upload File : |
// Copyright (c) 2016 Allan McAleavy. // Copyright (c) 2015 Brendan Gregg. // Licensed under the Apache License, Version 2.0 (the "License") #include <uapi/linux/ptrace.h> struct key_t { u64 ip; }; BPF_HASH(counts, struct key_t); int do_count(struct pt_regs *ctx) { struct key_t key = {}; u64 zero = 0, *val; u64 ip; key.ip = PT_REGS_IP(ctx); val = counts.lookup_or_init(&key, &zero); // update counter if (val) { (*val)++; } return 0; }