Jordan Rome
Jordan Rome
Also, just to add to my argument, we already look for the online cpus in codegen e.g. https://github.com/bpftrace/bpftrace/blob/master/src/ast/passes/codegen_llvm.cpp#L3599
Update: I added a bit of a hack to make this work for AOT. Basically, when in AOT mode, just set an upper max on the number of cpus to...
> btw, does it make sense to document this behavior? Good call. I'll add something in the adoc and also make a changelog entry.
> Can simplify semantic analyser with the type helper Good call. I'll update that. > A user could be doing a loop and only wanting to do expensive stuff if...
> Oh, I think we need a feature probe in semantic analyser as well for the map elem callback helper Let me put up a separate PR for that.
@ajor @viktormalik - Going to merge this soon unless you want more time to review.
@netoptimizer Good catch. Let me take a look.
Just wanted to follow up a bit after some internal discussion. As per the docs `++` uses a hash map (shared across CPUs) whereas `count` uses a per-cpu hash map,...
Dug into this a little more and AFAICT we're NOT double updating e.g. if I comment out this line, then the value doesn't get updated at all for a map...
Maybe another test for probes that are attached in reverse order would be good.