bas smit
bas smit
It's not on my list of things to fix, but it would be nice to have. Having a good usecase would also help to figure out the syntax for it....
working on a manpage where we can put all this stuff in, https://github.com/fbs/bpftrace/blob/manpage/man/adoc/bpftrace.adoc . The refguide can then be stripped down to a quick ref guide. Hope to have the...
#1935 adds the print syntax to the manpage. Is there any more we need to add?
> OS: Linux 5.10.81.1-microsoft-standard-WSL2 Maybe related? The lifetime of the test_trace program is longer than that of bpftrace right?
> It would be great to have a primitive like filter(@, 0, $itemid) which returns @ with the 0th level equal to $itemid. Then, one could print or delete that...
Ah I missed that for_each gets the key as callback. If delete is allowed from the callback it would be interesting.
> What would be the best design to prototype here? I think for simplicity's sake a new `delete_by_key_level(map, key level, value)` would be easiest but I'm open to other suggestions....
yes we've been quite lacking on the LLVM side and haven't kept up with developments there. THe way we extract program code is a bit of a hack as well...
After writing all this and thinking about it a bit im stuck between both options. I'm starting the prefer the `let` syntax but I'm a bit biassed and like having...
@brendangregg @danobi @mmisono @olsajiri @viktormalik wondering how you feel about this