Commit e09564df authored by Yonghong Song's avatar Yonghong Song Committed by Brenden Blanco

fix incorrect code generation in usdt

o This is caused by my ignorant error in previous usdt change.
  Obviously, I need to store into pointer address in order to
  propagate value back to caller.
o Thanks Tetsuo Handa pointing this out.
Signed-off-by: default avatarYonghong Song <yhs@fb.com>
parent ceaab89c
...@@ -152,7 +152,7 @@ bool Probe::usdt_getarg(std::ostream &stream) { ...@@ -152,7 +152,7 @@ bool Probe::usdt_getarg(std::ostream &stream) {
for (size_t arg_n = 0; arg_n < arg_count; ++arg_n) { for (size_t arg_n = 0; arg_n < arg_count; ++arg_n) {
std::string ctype = largest_arg_type(arg_n); std::string ctype = largest_arg_type(arg_n);
std::string cptr("dest"); std::string cptr = tfm::format("*((%s *)dest)", ctype);
tfm::format(stream, tfm::format(stream,
"static __always_inline int _bpf_readarg_%s_%d(" "static __always_inline int _bpf_readarg_%s_%d("
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment