about pt record
Closed this issue · 2 comments
liusy58 commented
Recently I'm doing some research on PT, I want to just trace the instruction of my a.out
binary, but when I entered
perf record -e intel_pt//u --filter 'filter .*@ a.out' ./a.out
the output shows below:
Failed to determine filter for a.out
No symbols found.
Failed to parse address filter: 'filter .*@ a.out'
Filter format is: filter|start|stop|tracestop <start symbol or address> [/ <end symbol or size>] [@<file name>]
Where multiple filters are separated by space or comma.
Could you please tell me how to fix this?
markus-metzger commented
I'm not sure whether wildcards in filter expressions are allowed. You'd need to ask perf developers.
What you could to is look at the a.out program headers and set an address filter on the text segment. For position independent executables, you'd look at the symbol table and pick a symbol at the very beginning plus an appropriate size.
liusy58 commented
Thanks for your reply.