-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eliminate duplicate LifetimeStart in CreateAllocaBPFInit, dedupe hoisting code #1792
Conversation
b5ff772
to
2cbaed3
Compare
2cbaed3
to
4a3c7fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with 1 nit, sorry about slow review
c5a75b2
to
3e13b7f
Compare
@danobi I've added a comment to @fbs I expect you'll be interested in the ELF differences, so I've run it:
this isn't entirely surprising; https://github.com/iovisor/bpftrace/blob/master/tools/tcpconnect.bt#L38-L44 if ($inet_family == AF_INET) {
$daddr = ntop($sk->__sk_common.skc_daddr);
$saddr = ntop($sk->__sk_common.skc_rcv_saddr);
} else {
$daddr = ntop($sk->__sk_common.skc_v6_daddr.in6_u.u6_addr8);
$saddr = ntop($sk->__sk_common.skc_v6_rcv_saddr.in6_u.u6_addr8);
} the variables so of course these tools are sensitive to changes in hoisting.
In both cases, it looks like it's just a minor reshuffle of instructions. I used the bpftrace built in my branch to run So, I think the shuffle in the binary output is inconsequential. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but looks like it needs fixture regeneration
c4c77e9
to
b9e5bdf
Compare
@danobi thanks; I've now rebased and regenerated fixtures. |
Thanks for working on this! |
* 'master' of github.com:iovisor/bpftrace: embedded: do a MinSizeRel llvm build Eliminate duplicate LifetimeStart in CreateAllocaBPFInit, dedupe hoisting code (bpftrace#1792) Safer getMapKey() (bpftrace#1780)
Resolves #1787
Checklist
docs/reference_guide.md
CHANGELOG.md