linux/pt: use more TIP packets to understand the IP
@@ -50,11 +50,20 @@ inline static void perf_ptAnalyzePkt(run_t* run, struct pt_packet* packet) {
}
uint64_t ip;
- if (packet->payload.ip.ipc == pt_ipc_sext_48) {
+ switch (packet->payload.ip.ipc) {
+ case pt_ipc_sext_48:
ip = sext(packet->payload.ip.ip, 48);
- } else if (packet->payload.ip.ipc == pt_ipc_full) {
+ break;
+ case pt_ipc_full:
ip = packet->payload.ip.ip;
- } else {
+ break;
+ case pt_ipc_update_32:
+ ip = packet->payload.ip.ip & 0xFFFFFFFF;
+ break;
+ case pt_ipc_update_48:
+ ip = packet->payload.ip.ip & 0xFFFFFFFFFFFF;
+ break;
+ default:
return;
}
