Alastair Robertson
Alastair Robertson
This lets programs such as this run: ``` BEGIN { @map[0] = 1; @map[1] = 2; $cnt = 0; for ($kv : @map) { $cnt++; // Previously would have errored...
[UPDATED BASED ON DISCUSSION] This ticket is just to decide on a common syntax for looping. We have number of issues for various new types of loops we want to...
Not every valid BPF program can be expressed in BpfScript, so sometimes it is necessary to drop down to C/libbpf. It would be useful to have a way to call...
This script should be valid: ``` # bpftrace -e 'BEGIN { @y = 0; @y = @x; @x = 1; }' stdin:1:17-19: ERROR: Type mismatch for @y: trying to assign...
``` BEGIN { $blah = "abc"; @x[$blah] = 1; @y[$blah] = 1; } ``` The variable `$blah` should be alive throughout the entire duration of the program, but inspecting the...
Current behaviour: ``` # bpftrace -e 'BEGIN { $tuple = (123, "123"); print($tuple); }' Attaching 1 probe... (123, 123) ``` I would expect the output to be: ``` (123, "123")...
``` # bpftrace -e 'struct Foo {int config;} BEGIN { $x = (struct Foo*)0; $x->config; }' stdin:1:56-66: ERROR: syntax error, unexpected config struct Foo {int config;} BEGIN { $x =...
A looping construct to iterate over map elements would be useful: ``` BEGIN { @x[1] = 100; @x[2] = 200; for ($kv : @x) { printf("key: %d\n", $kv.0); printf("val: %d\n",...
This is a proposal to introduce a new syntax for declaring maps ahead of their use, outside of probes: ``` let @x[uint64] = stack_t; BEGIN { @x[123] = ustack(); }...
#2950 added `-Werror=undef` which causes GTest's compilation to fail. https://github.com/iovisor/bpftrace/blob/f0c8f3fcd033a6ee2952b55ad272604f30146764/tests/CMakeLists.txt#L1 We need to decide if we want to keep support for vendoring GTest. Most major distros seem to provide gtest-1.11+...