Lines Matching refs:len
77 static int intel_pt_get_long_tnt(const unsigned char *buf, size_t len, in intel_pt_get_long_tnt() argument
83 if (len < 8) in intel_pt_get_long_tnt()
100 static int intel_pt_get_pip(const unsigned char *buf, size_t len, in intel_pt_get_pip() argument
105 if (len < 8) in intel_pt_get_pip()
121 static int intel_pt_get_cbr(const unsigned char *buf, size_t len, in intel_pt_get_cbr() argument
124 if (len < 4) in intel_pt_get_cbr()
131 static int intel_pt_get_vmcs(const unsigned char *buf, size_t len, in intel_pt_get_vmcs() argument
139 if (len < count + 2) in intel_pt_get_vmcs()
155 static int intel_pt_get_psb(const unsigned char *buf, size_t len, in intel_pt_get_psb() argument
160 if (len < 16) in intel_pt_get_psb()
178 static int intel_pt_get_tma(const unsigned char *buf, size_t len, in intel_pt_get_tma() argument
181 if (len < 7) in intel_pt_get_tma()
196 static int intel_pt_get_mnt(const unsigned char *buf, size_t len, in intel_pt_get_mnt() argument
199 if (len < 11) in intel_pt_get_mnt()
206 static int intel_pt_get_3byte(const unsigned char *buf, size_t len, in intel_pt_get_3byte() argument
209 if (len < 3) in intel_pt_get_3byte()
214 return intel_pt_get_mnt(buf, len, packet); in intel_pt_get_3byte()
220 static int intel_pt_get_ptwrite(const unsigned char *buf, size_t len, in intel_pt_get_ptwrite() argument
229 if (len < 6) in intel_pt_get_ptwrite()
234 if (len < 10) in intel_pt_get_ptwrite()
255 static int intel_pt_get_mwait(const unsigned char *buf, size_t len, in intel_pt_get_mwait() argument
258 if (len < 10) in intel_pt_get_mwait()
265 static int intel_pt_get_pwre(const unsigned char *buf, size_t len, in intel_pt_get_pwre() argument
268 if (len < 4) in intel_pt_get_pwre()
275 static int intel_pt_get_pwrx(const unsigned char *buf, size_t len, in intel_pt_get_pwrx() argument
278 if (len < 7) in intel_pt_get_pwrx()
285 static int intel_pt_get_bbp(const unsigned char *buf, size_t len, in intel_pt_get_bbp() argument
288 if (len < 3) in intel_pt_get_bbp()
296 static int intel_pt_get_bip_4(const unsigned char *buf, size_t len, in intel_pt_get_bip_4() argument
299 if (len < 5) in intel_pt_get_bip_4()
307 static int intel_pt_get_bip_8(const unsigned char *buf, size_t len, in intel_pt_get_bip_8() argument
310 if (len < 9) in intel_pt_get_bip_8()
318 static int intel_pt_get_bep(size_t len, struct intel_pt_pkt *packet) in intel_pt_get_bep() argument
320 if (len < 2) in intel_pt_get_bep()
326 static int intel_pt_get_bep_ip(size_t len, struct intel_pt_pkt *packet) in intel_pt_get_bep_ip() argument
328 if (len < 2) in intel_pt_get_bep_ip()
334 static int intel_pt_get_cfe(const unsigned char *buf, size_t len, in intel_pt_get_cfe() argument
337 if (len < 4) in intel_pt_get_cfe()
345 static int intel_pt_get_evd(const unsigned char *buf, size_t len, in intel_pt_get_evd() argument
348 if (len < 11) in intel_pt_get_evd()
357 static int intel_pt_get_ext(const unsigned char *buf, size_t len, in intel_pt_get_ext() argument
360 if (len < 2) in intel_pt_get_ext()
364 return intel_pt_get_ptwrite(buf, len, packet); in intel_pt_get_ext()
368 return intel_pt_get_long_tnt(buf, len, packet); in intel_pt_get_ext()
370 return intel_pt_get_pip(buf, len, packet); in intel_pt_get_ext()
374 return intel_pt_get_cbr(buf, len, packet); in intel_pt_get_ext()
376 return intel_pt_get_vmcs(buf, len, packet); in intel_pt_get_ext()
380 return intel_pt_get_psb(buf, len, packet); in intel_pt_get_ext()
384 return intel_pt_get_tma(buf, len, packet); in intel_pt_get_ext()
386 return intel_pt_get_3byte(buf, len, packet); in intel_pt_get_ext()
392 return intel_pt_get_mwait(buf, len, packet); in intel_pt_get_ext()
394 return intel_pt_get_pwre(buf, len, packet); in intel_pt_get_ext()
396 return intel_pt_get_pwrx(buf, len, packet); in intel_pt_get_ext()
398 return intel_pt_get_bbp(buf, len, packet); in intel_pt_get_ext()
400 return intel_pt_get_bep(len, packet); in intel_pt_get_ext()
402 return intel_pt_get_bep_ip(len, packet); in intel_pt_get_ext()
404 return intel_pt_get_cfe(buf, len, packet); in intel_pt_get_ext()
406 return intel_pt_get_evd(buf, len, packet); in intel_pt_get_ext()
431 size_t len, struct intel_pt_pkt *packet) in intel_pt_get_cyc() argument
437 len -= 1; in intel_pt_get_cyc()
441 if (len < offs) in intel_pt_get_cyc()
453 const unsigned char *buf, size_t len, in intel_pt_get_ip() argument
465 if (len < 3) in intel_pt_get_ip()
471 if (len < 5) in intel_pt_get_ip()
478 if (len < 7) in intel_pt_get_ip()
484 if (len < 9) in intel_pt_get_ip()
498 static int intel_pt_get_mode(const unsigned char *buf, size_t len, in intel_pt_get_mode() argument
501 if (len < 2) in intel_pt_get_mode()
535 static int intel_pt_get_tsc(const unsigned char *buf, size_t len, in intel_pt_get_tsc() argument
538 if (len < 8) in intel_pt_get_tsc()
545 static int intel_pt_get_mtc(const unsigned char *buf, size_t len, in intel_pt_get_mtc() argument
548 if (len < 2) in intel_pt_get_mtc()
555 static int intel_pt_do_get_packet(const unsigned char *buf, size_t len, in intel_pt_do_get_packet() argument
563 if (!len) in intel_pt_do_get_packet()
573 return intel_pt_get_bip_4(buf, len, packet); in intel_pt_do_get_packet()
577 return intel_pt_get_bip_8(buf, len, packet); in intel_pt_do_get_packet()
587 return intel_pt_get_ext(buf, len, packet); in intel_pt_do_get_packet()
592 return intel_pt_get_cyc(byte, buf, len, packet); in intel_pt_do_get_packet()
596 return intel_pt_get_ip(INTEL_PT_TIP, byte, buf, len, packet); in intel_pt_do_get_packet()
598 return intel_pt_get_ip(INTEL_PT_TIP_PGE, byte, buf, len, in intel_pt_do_get_packet()
601 return intel_pt_get_ip(INTEL_PT_TIP_PGD, byte, buf, len, in intel_pt_do_get_packet()
604 return intel_pt_get_ip(INTEL_PT_FUP, byte, buf, len, packet); in intel_pt_do_get_packet()
608 return intel_pt_get_mode(buf, len, packet); in intel_pt_do_get_packet()
610 return intel_pt_get_tsc(buf, len, packet); in intel_pt_do_get_packet()
612 return intel_pt_get_mtc(buf, len, packet); in intel_pt_do_get_packet()
673 int intel_pt_get_packet(const unsigned char *buf, size_t len, in intel_pt_get_packet() argument
678 ret = intel_pt_do_get_packet(buf, len, packet, *ctx); in intel_pt_get_packet()
680 while (ret < 8 && len > (size_t)ret && !buf[ret]) in intel_pt_get_packet()