Lines Matching full:len
73 static int intel_pt_get_long_tnt(const unsigned char *buf, size_t len, in intel_pt_get_long_tnt() argument
79 if (len < 8) in intel_pt_get_long_tnt()
96 static int intel_pt_get_pip(const unsigned char *buf, size_t len, in intel_pt_get_pip() argument
101 if (len < 8) in intel_pt_get_pip()
117 static int intel_pt_get_cbr(const unsigned char *buf, size_t len, in intel_pt_get_cbr() argument
120 if (len < 4) in intel_pt_get_cbr()
127 static int intel_pt_get_vmcs(const unsigned char *buf, size_t len, in intel_pt_get_vmcs() argument
130 if (len < 7) in intel_pt_get_vmcs()
146 static int intel_pt_get_psb(const unsigned char *buf, size_t len, in intel_pt_get_psb() argument
151 if (len < 16) in intel_pt_get_psb()
169 static int intel_pt_get_tma(const unsigned char *buf, size_t len, in intel_pt_get_tma() argument
172 if (len < 7) in intel_pt_get_tma()
187 static int intel_pt_get_mnt(const unsigned char *buf, size_t len, in intel_pt_get_mnt() argument
190 if (len < 11) in intel_pt_get_mnt()
197 static int intel_pt_get_3byte(const unsigned char *buf, size_t len, in intel_pt_get_3byte() argument
200 if (len < 3) in intel_pt_get_3byte()
205 return intel_pt_get_mnt(buf, len, packet); in intel_pt_get_3byte()
211 static int intel_pt_get_ptwrite(const unsigned char *buf, size_t len, in intel_pt_get_ptwrite() argument
220 if (len < 6) in intel_pt_get_ptwrite()
225 if (len < 10) in intel_pt_get_ptwrite()
246 static int intel_pt_get_mwait(const unsigned char *buf, size_t len, in intel_pt_get_mwait() argument
249 if (len < 10) in intel_pt_get_mwait()
256 static int intel_pt_get_pwre(const unsigned char *buf, size_t len, in intel_pt_get_pwre() argument
259 if (len < 4) in intel_pt_get_pwre()
266 static int intel_pt_get_pwrx(const unsigned char *buf, size_t len, in intel_pt_get_pwrx() argument
269 if (len < 7) in intel_pt_get_pwrx()
276 static int intel_pt_get_bbp(const unsigned char *buf, size_t len, in intel_pt_get_bbp() argument
279 if (len < 3) in intel_pt_get_bbp()
287 static int intel_pt_get_bip_4(const unsigned char *buf, size_t len, in intel_pt_get_bip_4() argument
290 if (len < 5) in intel_pt_get_bip_4()
298 static int intel_pt_get_bip_8(const unsigned char *buf, size_t len, in intel_pt_get_bip_8() argument
301 if (len < 9) in intel_pt_get_bip_8()
309 static int intel_pt_get_bep(size_t len, struct intel_pt_pkt *packet) in intel_pt_get_bep() argument
311 if (len < 2) in intel_pt_get_bep()
317 static int intel_pt_get_bep_ip(size_t len, struct intel_pt_pkt *packet) in intel_pt_get_bep_ip() argument
319 if (len < 2) in intel_pt_get_bep_ip()
325 static int intel_pt_get_cfe(const unsigned char *buf, size_t len, in intel_pt_get_cfe() argument
328 if (len < 4) in intel_pt_get_cfe()
336 static int intel_pt_get_evd(const unsigned char *buf, size_t len, in intel_pt_get_evd() argument
339 if (len < 11) in intel_pt_get_evd()
348 static int intel_pt_get_ext(const unsigned char *buf, size_t len, in intel_pt_get_ext() argument
351 if (len < 2) in intel_pt_get_ext()
355 return intel_pt_get_ptwrite(buf, len, packet); in intel_pt_get_ext()
359 return intel_pt_get_long_tnt(buf, len, packet); in intel_pt_get_ext()
361 return intel_pt_get_pip(buf, len, packet); in intel_pt_get_ext()
365 return intel_pt_get_cbr(buf, len, packet); in intel_pt_get_ext()
367 return intel_pt_get_vmcs(buf, len, packet); in intel_pt_get_ext()
371 return intel_pt_get_psb(buf, len, packet); in intel_pt_get_ext()
375 return intel_pt_get_tma(buf, len, packet); in intel_pt_get_ext()
377 return intel_pt_get_3byte(buf, len, packet); in intel_pt_get_ext()
383 return intel_pt_get_mwait(buf, len, packet); in intel_pt_get_ext()
385 return intel_pt_get_pwre(buf, len, packet); in intel_pt_get_ext()
387 return intel_pt_get_pwrx(buf, len, packet); in intel_pt_get_ext()
389 return intel_pt_get_bbp(buf, len, packet); in intel_pt_get_ext()
391 return intel_pt_get_bep(len, packet); in intel_pt_get_ext()
393 return intel_pt_get_bep_ip(len, packet); in intel_pt_get_ext()
395 return intel_pt_get_cfe(buf, len, packet); in intel_pt_get_ext()
397 return intel_pt_get_evd(buf, len, packet); in intel_pt_get_ext()
422 size_t len, struct intel_pt_pkt *packet) in intel_pt_get_cyc() argument
428 len -= 1; in intel_pt_get_cyc()
432 if (len < offs) in intel_pt_get_cyc()
444 const unsigned char *buf, size_t len, in intel_pt_get_ip() argument
456 if (len < 3) in intel_pt_get_ip()
462 if (len < 5) in intel_pt_get_ip()
469 if (len < 7) in intel_pt_get_ip()
475 if (len < 9) in intel_pt_get_ip()
489 static int intel_pt_get_mode(const unsigned char *buf, size_t len, in intel_pt_get_mode() argument
492 if (len < 2) in intel_pt_get_mode()
526 static int intel_pt_get_tsc(const unsigned char *buf, size_t len, in intel_pt_get_tsc() argument
529 if (len < 8) in intel_pt_get_tsc()
536 static int intel_pt_get_mtc(const unsigned char *buf, size_t len, in intel_pt_get_mtc() argument
539 if (len < 2) in intel_pt_get_mtc()
546 static int intel_pt_do_get_packet(const unsigned char *buf, size_t len, in intel_pt_do_get_packet() argument
554 if (!len) in intel_pt_do_get_packet()
564 return intel_pt_get_bip_4(buf, len, packet); in intel_pt_do_get_packet()
568 return intel_pt_get_bip_8(buf, len, packet); in intel_pt_do_get_packet()
578 return intel_pt_get_ext(buf, len, packet); in intel_pt_do_get_packet()
583 return intel_pt_get_cyc(byte, buf, len, packet); in intel_pt_do_get_packet()
587 return intel_pt_get_ip(INTEL_PT_TIP, byte, buf, len, packet); in intel_pt_do_get_packet()
589 return intel_pt_get_ip(INTEL_PT_TIP_PGE, byte, buf, len, in intel_pt_do_get_packet()
592 return intel_pt_get_ip(INTEL_PT_TIP_PGD, byte, buf, len, in intel_pt_do_get_packet()
595 return intel_pt_get_ip(INTEL_PT_FUP, byte, buf, len, packet); in intel_pt_do_get_packet()
599 return intel_pt_get_mode(buf, len, packet); in intel_pt_do_get_packet()
601 return intel_pt_get_tsc(buf, len, packet); in intel_pt_do_get_packet()
603 return intel_pt_get_mtc(buf, len, packet); in intel_pt_do_get_packet()
664 int intel_pt_get_packet(const unsigned char *buf, size_t len, in intel_pt_get_packet() argument
669 ret = intel_pt_do_get_packet(buf, len, packet, *ctx); in intel_pt_get_packet()
671 while (ret < 8 && len > (size_t)ret && !buf[ret]) in intel_pt_get_packet()