Lines Matching +full:image +full:- +full:processor
2 * Copyright (c) 2013-2019, Intel Corporation
40 /* Intel(R) Processor Trace (Intel PT) decoder library.
44 * - Version
45 * - Errors
46 * - Configuration
47 * - Packet encoder / decoder
48 * - Query decoder
49 * - Traced image
50 * - Instruction flow decoder
51 * - Block decoder
163 /* No wall-clock time is available. */
169 /* Bad traced image. */
207 return (status >= 0) ? pte_ok : (enum pt_error_code) -status;
242 /** BDM70: Intel(R) Processor Trace PSB+ Packets May Contain
247 * Some Intel Processor Trace packets should be issued only between
254 /** BDM64: An Incorrect LBR or Intel(R) Processor Trace Packet May Be
261 * Processor Trace (Intel(R) PT) packet before the LBR or Intel PT
270 * Under complex micro-architectural conditions, an Intel PT (Processor
272 * multi-byte CYC (Cycle Count) packet, instead of any remaining bytes
281 * If VM entry clears Intel(R) PT (Intel Processor Trace)
285 * VM-entry MSR-load area includes an entry for the IA32_RTIT_CTL MSR.
293 * Some Intel PT (Intel Processor Trace) OVF (Overflow) packets may not
303 * When Intel PT (Intel Processor Trace) is enabled and a direct
313 * Certain Intel PT (Processor Trace) packets including FUPs (Flow
315 * Packet - Packet Generaton Enable) and TIP.PGD (Target IP Packet -
325 * If Intel PT (Processor Trace) encounters an internal buffer overflow
329 * OVF may be followed by a TIP.PGD (Target Instruction Pointer - Packet
338 * PT (Processor Trace) PSB (Packet Stream Boundary) packet can cause a
348 /** A collection of decoder-specific configuration flags. */
452 /** The user-defined context for this configuration. */
489 /** A collection of decoder-specific flags. */
497 /** Zero-initialize an Intel PT configuration. */
502 config->size = sizeof(*config);
510 * Returns -pte_invalid if \@errata or \@cpu is NULL.
511 * Returns -pte_bad_cpu if \@cpu is not known.
596 /** A TNT-8 or TNT-64 packet. */
610 /** Zero-extended payload ip. */
626 if (packet->csl)
627 return packet->csd ? ptem_unknown : ptem_64bit;
629 return packet->csd ? ptem_32bit : ptem_16bit;
691 /** The non-root bit. */
761 /** The resolved thread C-state. */
764 /** The resolved thread sub C-state. */
767 /** A flag indicating whether the C-state entry was initiated by h/w. */
773 /** The core C-state at the time of the wake. */
776 /** The deepest core C-state achieved during sleep. */
781 * - due to external interrupt received.
785 /** - due to store to monitored address. */
788 /** - due to h/w autonomous condition such as HDC. */
817 return -pte_bad_packet;
820 return -pte_internal;
828 /** Optional pointer to a user-defined structure. */
845 /** Packets: pad, ovf, psb, psbend, stop - no payload. */
847 /** Packet: tnt-8, tnt-64. */
928 * Returns -pte_eos if the given offset is behind the end of the trace buffer.
929 * Returns -pte_invalid if \@encoder is NULL.
942 * Returns -pte_invalid if \@encoder or \@offset is NULL.
949 * Returns a non-null pointer on success, NULL if \@encoder is NULL.
967 * Returns -pte_bad_opc if \@packet.type is not known.
968 * Returns -pte_bad_packet if \@packet's payload is invalid.
969 * Returns -pte_eos if \@encoder reached the end of the Intel PT buffer.
970 * Returns -pte_invalid if \@encoder or \@packet is NULL.
1007 * Returns -pte_eos if no further synchronization point is found.
1008 * Returns -pte_invalid if \@decoder is NULL.
1019 * Returns -pte_eos if the given offset is behind the end of the trace buffer.
1020 * Returns -pte_invalid if \@decoder is NULL.
1033 * Returns -pte_invalid if \@decoder or \@offset is NULL.
1034 * Returns -pte_nosync if \@decoder is out of sync.
1047 * Returns -pte_invalid if \@decoder or \@offset is NULL.
1048 * Returns -pte_nosync if \@decoder is out of sync.
1056 * Returns a non-null pointer on success, NULL if \@decoder is NULL.
1072 * Returns -pte_bad_opc if the packet is unknown.
1073 * Returns -pte_bad_packet if an unknown packet payload is encountered.
1074 * Returns -pte_eos if \@decoder reached the end of the Intel PT buffer.
1075 * Returns -pte_invalid if \@decoder or \@packet is NULL.
1076 * Returns -pte_nosync if \@decoder is out of sync.
1256 * vmx non-root (guest) mode.
1276 * vmx non-root (guest) mode.
1323 * The address is zero-extended with the lower 12 bits
1337 * The address is zero-extended with the lower 12 bits
1383 /** The resolved thread C-state. */
1386 /** The resolved thread sub C-state. */
1389 /** A flag indicating whether the C-state entry was
1397 /** The core C-state at the time of the wake. */
1400 /** The deepest core C-state achieved during sleep. */
1405 * - due to external interrupt received.
1409 /** - due to store to monitored address. */
1412 /** - due to h/w autonomous condition such as HDC. */
1488 * Returns a non-negative pt_status_flag bit-vector on success, a negative error
1491 * Returns -pte_bad_opc if an unknown packet is encountered.
1492 * Returns -pte_bad_packet if an unknown packet payload is encountered.
1493 * Returns -pte_eos if no further synchronization point is found.
1494 * Returns -pte_invalid if \@decoder is NULL.
1508 * Returns a non-negative pt_status_flag bit-vector on success, a negative error
1511 * Returns -pte_bad_opc if an unknown packet is encountered.
1512 * Returns -pte_bad_packet if an unknown packet payload is encountered.
1513 * Returns -pte_eos if \@offset lies outside of \@decoder's trace buffer.
1514 * Returns -pte_eos if \@decoder reaches the end of its trace buffer.
1515 * Returns -pte_invalid if \@decoder is NULL.
1516 * Returns -pte_nosync if there is no syncpoint at \@offset.
1529 * Returns -pte_invalid if \@decoder or \@offset is NULL.
1530 * Returns -pte_nosync if \@decoder is out of sync.
1543 * Returns -pte_invalid if \@decoder or \@offset is NULL.
1544 * Returns -pte_nosync if \@decoder is out of sync.
1552 * Returns a non-null pointer on success, NULL if \@decoder is NULL.
1562 * Returns a non-negative pt_status_flag bit-vector on success, a negative error
1565 * Returns -pte_bad_opc if an unknown packet is encountered.
1566 * Returns -pte_bad_packet if an unknown packet payload is encountered.
1567 * Returns -pte_bad_query if no conditional branch is found.
1568 * Returns -pte_eos if decoding reached the end of the Intel PT buffer.
1569 * Returns -pte_invalid if \@decoder or \@taken is NULL.
1570 * Returns -pte_nosync if \@decoder is out of sync.
1580 * Returns a non-negative pt_status_flag bit-vector on success, a negative error
1583 * Returns -pte_bad_opc if an unknown packet is encountered.
1584 * Returns -pte_bad_packet if an unknown packet payload is encountered.
1585 * Returns -pte_bad_query if no indirect branch is found.
1586 * Returns -pte_eos if decoding reached the end of the Intel PT buffer.
1587 * Returns -pte_invalid if \@decoder or \@ip is NULL.
1588 * Returns -pte_nosync if \@decoder is out of sync.
1599 * Returns a non-negative pt_status_flag bit-vector on success, a negative error
1602 * Returns -pte_bad_opc if an unknown packet is encountered.
1603 * Returns -pte_bad_packet if an unknown packet payload is encountered.
1604 * Returns -pte_bad_query if no event is found.
1605 * Returns -pte_eos if decoding reached the end of the Intel PT buffer.
1606 * Returns -pte_invalid if \@decoder or \@event is NULL.
1607 * Returns -pte_invalid if \@size is too small.
1608 * Returns -pte_nosync if \@decoder is out of sync.
1620 * to correlate with other TSC-based time sources. In this case, -pte_no_time
1623 * Some timing-related packets may need to be dropped (mostly due to missing
1632 * Returns -pte_invalid if \@decoder or \@time is NULL.
1633 * Returns -pte_no_time if there has not been a TSC packet.
1646 * Returns -pte_invalid if \@decoder or \@cbr is NULL.
1647 * Returns -pte_no_cbr if there has not been a CBR packet.
1654 /* Traced image. */
1664 /** The size of this object - set to sizeof(struct pt_asid). */
1683 asid->size = sizeof(*asid);
1684 asid->cr3 = pt_asid_no_cr3;
1685 asid->vmcs = pt_asid_no_vmcs;
1689 /** A cache of traced image sections. */
1692 /** Allocate a traced memory image section cache.
1696 * Returns a new traced memory image section cache on success, NULL otherwise.
1701 /** Free a traced memory image section cache.
1708 /** Set the image section cache limit.
1710 * Set the limit for a section cache in bytes. A non-zero limit will keep the
1715 * Returns -pte_invalid if \@iscache is NULL.
1720 /** Get the image section cache name.
1727 /** Add a new file section to the traced memory image section cache.
1733 * Returns an image section identifier (isid) uniquely identifying that section
1740 * Returns -pte_invalid if \@iscache or \@filename is NULL.
1741 * Returns -pte_invalid if \@offset is too big.
1760 * Returns -pte_invalid if \@iscache or \@buffer is NULL.
1761 * Returns -pte_invalid if \@size is zero.
1762 * Returns -pte_nomap if \@vaddr is not contained in section \@isid.
1763 * Returns -pte_bad_image if \@iscache does not contain \@isid.
1769 /** The traced memory image. */
1773 /** Allocate a traced memory image.
1775 * An optional \@name may be given to the image. The name string is copied.
1777 * Returns a new traced memory image on success, NULL otherwise.
1781 /** Free a traced memory image.
1783 * The \@image must have been allocated with pt_image_alloc().
1784 * The \@image must not be used after a successful return.
1786 extern pt_export void pt_image_free(struct pt_image *image);
1788 /** Get the image name.
1790 * Returns a pointer to \@image's name or NULL if there is no name.
1792 extern pt_export const char *pt_image_name(const struct pt_image *image);
1794 /** Add a new file section to the traced memory image.
1800 * fields are considered when comparing with other address-spaces. Use this
1810 * Returns -pte_invalid if \@image or \@filename is NULL.
1811 * Returns -pte_invalid if \@offset is too big.
1813 extern pt_export int pt_image_add_file(struct pt_image *image,
1819 /** Add a section from an image section cache.
1827 * Returns -pte_invalid if \@image or \@iscache is NULL.
1828 * Returns -pte_bad_image if \@iscache does not contain \@isid.
1830 extern pt_export int pt_image_add_cached(struct pt_image *image,
1834 /** Copy an image.
1836 * Adds all sections from \@src to \@image. Sections that could not be added
1842 * Returns -pte_invalid if \@image or \@src is NULL.
1844 extern pt_export int pt_image_copy(struct pt_image *image,
1855 * Returns -pte_invalid if \@image or \@filename is NULL.
1857 extern pt_export int pt_image_remove_by_filename(struct pt_image *image,
1869 * Returns -pte_invalid if \@image is NULL.
1871 extern pt_export int pt_image_remove_by_asid(struct pt_image *image,
1886 /** Set the memory callback for the traced memory image.
1895 * Returns -pte_invalid if \@image is NULL.
1897 extern pt_export int pt_image_set_callback(struct pt_image *image,
1931 /* The instruction is a call-like far transfer.
1936 /* The instruction is a return-like far transfer.
1941 /* The instruction is a jump-like far transfer.
1960 /** The image section identifier for the section containing this
1964 * The section was not added via an image section cache or the memory
1983 * - the instruction was executed speculatively.
1987 /** - this instruction is truncated in its image section.
1989 * It starts in the image section identified by \@isid and continues
2008 * This will destroy the decoder's default image.
2024 * Returns -pte_bad_opc if an unknown packet is encountered.
2025 * Returns -pte_bad_packet if an unknown packet payload is encountered.
2026 * Returns -pte_eos if no further synchronization point is found.
2027 * Returns -pte_invalid if \@decoder is NULL.
2039 * Returns -pte_bad_opc if an unknown packet is encountered.
2040 * Returns -pte_bad_packet if an unknown packet payload is encountered.
2041 * Returns -pte_eos if \@offset lies outside of \@decoder's trace buffer.
2042 * Returns -pte_eos if \@decoder reaches the end of its trace buffer.
2043 * Returns -pte_invalid if \@decoder is NULL.
2044 * Returns -pte_nosync if there is no syncpoint at \@offset.
2057 * Returns -pte_invalid if \@decoder or \@offset is NULL.
2058 * Returns -pte_nosync if \@decoder is out of sync.
2069 * Returns -pte_invalid if \@decoder or \@offset is NULL.
2070 * Returns -pte_nosync if \@decoder is out of sync.
2076 /** Get the traced image.
2078 * The returned image may be modified as long as no decoder that uses this
2079 * image is running.
2081 * Returns a pointer to the traced image the decoder uses for reading memory.
2087 /** Set the traced image.
2089 * Sets the image that \@decoder uses for reading memory to \@image. If \@image
2090 * is NULL, sets the image to \@decoder's default image.
2092 * Only one image can be active at any time.
2095 * Return -pte_invalid if \@decoder is NULL.
2098 struct pt_image *image);
2102 * Returns a non-null pointer on success, NULL if \@decoder is NULL.
2114 * to correlate with other TSC-based time sources. In this case, -pte_no_time
2117 * Some timing-related packets may need to be dropped (mostly due to missing
2126 * Returns -pte_invalid if \@decoder or \@time is NULL.
2127 * Returns -pte_no_time if there has not been a TSC packet.
2140 * Returns -pte_invalid if \@decoder or \@cbr is NULL.
2141 * Returns -pte_no_cbr if there has not been a CBR packet.
2151 * bytes will be copied and \@asid->size will be set to the actual size of the
2156 * Returns -pte_invalid if \@decoder or \@asid is NULL.
2167 * Returns a non-negative pt_status_flag bit-vector on success, a negative error
2174 * Returns -pte_bad_context if the decoder encountered an unexpected packet.
2175 * Returns -pte_bad_opc if the decoder encountered unknown packets.
2176 * Returns -pte_bad_packet if the decoder encountered unknown packet payloads.
2177 * Returns -pte_bad_query if the decoder got out of sync.
2178 * Returns -pte_eos if decoding reached the end of the Intel PT buffer.
2179 * Returns -pte_invalid if \@decoder or \@insn is NULL.
2180 * Returns -pte_nomap if the memory at the instruction address can't be read.
2181 * Returns -pte_nosync if \@decoder is out of sync.
2192 * Returns a non-negative pt_status_flag bit-vector on success, a negative error
2195 * Returns -pte_bad_query if there is no event.
2196 * Returns -pte_invalid if \@decoder or \@event is NULL.
2197 * Returns -pte_invalid if \@size is too small.
2219 * This can be used for error-detection.
2223 /** The image section that contains the instructions in this block.
2226 * The section was not added via an image section cache or the memory
2261 * - all instructions in this block were executed speculatively.
2265 /** - the last instruction in this block is truncated.
2268 * other sections depending on how fragmented the memory image is.
2288 * This will destroy the decoder's default image.
2304 * Returns -pte_bad_opc if an unknown packet is encountered.
2305 * Returns -pte_bad_packet if an unknown packet payload is encountered.
2306 * Returns -pte_eos if no further synchronization point is found.
2307 * Returns -pte_invalid if \@decoder is NULL.
2319 * Returns -pte_bad_opc if an unknown packet is encountered.
2320 * Returns -pte_bad_packet if an unknown packet payload is encountered.
2321 * Returns -pte_eos if \@offset lies outside of \@decoder's trace buffer.
2322 * Returns -pte_eos if \@decoder reaches the end of its trace buffer.
2323 * Returns -pte_invalid if \@decoder is NULL.
2324 * Returns -pte_nosync if there is no syncpoint at \@offset.
2337 * Returns -pte_invalid if \@decoder or \@offset is NULL.
2338 * Returns -pte_nosync if \@decoder is out of sync.
2349 * Returns -pte_invalid if \@decoder or \@offset is NULL.
2350 * Returns -pte_nosync if \@decoder is out of sync.
2356 /** Get the traced image.
2358 * The returned image may be modified as long as \@decoder is not running.
2360 * Returns a pointer to the traced image \@decoder uses for reading memory.
2366 /** Set the traced image.
2368 * Sets the image that \@decoder uses for reading memory to \@image. If \@image
2369 * is NULL, sets the image to \@decoder's default image.
2371 * Only one image can be active at any time.
2374 * Return -pte_invalid if \@decoder is NULL.
2377 struct pt_image *image);
2381 * Returns a non-null pointer on success, NULL if \@decoder is NULL.
2393 * to correlate with other TSC-based time sources. In this case, -pte_no_time
2396 * Some timing-related packets may need to be dropped (mostly due to missing
2405 * Returns -pte_invalid if \@decoder or \@time is NULL.
2406 * Returns -pte_no_time if there has not been a TSC packet.
2419 * Returns -pte_invalid if \@decoder or \@cbr is NULL.
2420 * Returns -pte_no_cbr if there has not been a CBR packet.
2430 * bytes will be copied and \@asid->size will be set to the actual size of the
2435 * Returns -pte_invalid if \@decoder or \@asid is NULL.
2447 * Returns a non-negative pt_status_flag bit-vector on success, a negative error
2454 * Returns -pte_bad_context if the decoder encountered an unexpected packet.
2455 * Returns -pte_bad_opc if the decoder encountered unknown packets.
2456 * Returns -pte_bad_packet if the decoder encountered unknown packet payloads.
2457 * Returns -pte_bad_query if the decoder got out of sync.
2458 * Returns -pte_eos if decoding reached the end of the Intel PT buffer.
2459 * Returns -pte_invalid if \@decoder or \@block is NULL.
2460 * Returns -pte_nomap if the memory at the instruction address can't be read.
2461 * Returns -pte_nosync if \@decoder is out of sync.
2472 * Returns a non-negative pt_status_flag bit-vector on success, a negative error
2475 * Returns -pte_bad_query if there is no event.
2476 * Returns -pte_invalid if \@decoder or \@event is NULL.
2477 * Returns -pte_invalid if \@size is too small.