surftrace icon indicating copy to clipboard operation
surftrace copied to clipboard

support navigate complex data object in user-space trace script

Open ChinaXing opened this issue 3 years ago • 0 comments

just like the bpftrace, its better to enable trace an running program in user-space and navigate/ traverse its argument and member field of the argument when it is a complex data object:

surftrace -e 'uprobe:/home/test/observer:oceanbase_transaction { printf("%d", arg0->mvcc_ctx_->tx_id_); }'

Here, the arg0 is the argument of function 'oceanbase_transaction' with type 'ObTxDesc', and we want to print the transaction id

info, which nested in 'ObTxDesc.mvcc_ctx_.tx_id_'

Thanks:)

ChinaXing avatar Jun 24 '22 08:06 ChinaXing