Comments (3)
Or even supporting both explicit or implicit value types (3rd argument optional):
BPF_HASH(start, struct request *, u64);
BPF_HASH(start, struct request *);
from bcc.
This has been working, so the ticket can be closed.
It works for hashes that exist only for the C program; eg, temporarily storing timestamps.
I hit issues accessing a BPF_HASH() key (when a key_t is not in use, like in the example above) from Python, complaining about it not being c_int, but that can be a separate issue.
from bcc.
For the python case you mentioned, what I tend to do is wrap things that should be a ctype with a Table.Key() or Table.Leaf() type.
For instance, if Key is a complex type like struct { int a; int b; }
:
b["stats"][b["stats"].Key(0, 1)] = b["stats"].Leaf(42)
from bcc.
Related Issues (20)
- Wrong Tag for 0.29.0 HOT 2
- 0.29.0: install target uses hardcoded install directory for python modules HOT 15
- Does BCC not support multiple attachments?
- does bcc support skb api? HOT 1
- bindsnoop.bpf.c throws errors while compiling the libbpf-tools HOT 2
- bpf.sym(addr, pid, show_module=True, show_offset=True) Occupying a large amount of memory leading to system restart HOT 1
- When using memleak.py, one piece of stack information has only one layer of depth HOT 1
- What 'sudo opensnoop-bpfcc' does and question another so how to eat junk e-mails for better network ?
- Debian build broken because of changelog divergence with last tag
- How to detach uprobes with invalid `/proc/fs` binary path after process terminates? HOT 4
- Can bpf_spin_lock directly be used in BCC? HOT 3
- use perf_event in XDP program
- libbpf-tools/trace_helper: Add feature to symbolize stripped ELF binary if it contains `.gnu_debuglink` section HOT 2
- cannot see pthread_cond_wait on offcpu graph HOT 5
- Feature request: inspect the size (not capacity) of BPF_HASH
- tcpretrans causes error on latest Ubuntu HOT 1
- Kernel stack traces HOT 13
- biotop reports all operations as reads HOT 6
- Error: unknown argument: '-fcf-protection' HOT 2
- tool/sslsniff.py
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bcc.