Lines Matching full:decoder
40 /* Intel(R) Processor Trace (Intel PT) decoder library.
47 * - Packet encoder / decoder
48 * - Query decoder
50 * - Instruction flow decoder
51 * - Block decoder
121 /* Internal decoder error. */
127 /* Decoder out of sync. */
139 /* Decoder reached end of trace stream. */
145 /* Decoder out of memory. */
184 /* The current decoder state does not match the state in the trace. */
348 /** A collection of decoder-specific configuration flags. */
350 /** The decoder variant. */
352 /** Flags for the block decoder. */
367 /** Flags for the instruction flow decoder. */
376 /** Flags for the query decoder. */
424 /** An Intel PT decoder configuration.
489 /** A collection of decoder-specific flags. */
518 /* Packet encoder / decoder. */
527 /* A packet decodable by the optional decoder callback. */
823 /** An unknown packet decodable by the optional decoder callback. */
977 /* Packet decoder. */
981 /** Allocate an Intel PT packet decoder.
983 * The decoder will work on the buffer defined in \@config, it shall contain
984 * raw trace data and remain valid for the lifetime of the decoder.
986 * The decoder needs to be synchronized before it can be used.
991 /** Free an Intel PT packet decoder.
993 * The \@decoder must not be used after a successful return.
995 extern pt_export void pt_pkt_free_decoder(struct pt_packet_decoder *decoder);
997 /** Synchronize an Intel PT packet decoder.
1001 * If \@decoder has not been synchronized, yet, the search is started at the
1008 * Returns -pte_invalid if \@decoder is NULL.
1010 extern pt_export int pt_pkt_sync_forward(struct pt_packet_decoder *decoder);
1011 extern pt_export int pt_pkt_sync_backward(struct pt_packet_decoder *decoder);
1013 /** Hard set synchronization point of an Intel PT decoder.
1015 * Synchronize \@decoder to \@offset within the trace buffer.
1020 * Returns -pte_invalid if \@decoder is NULL.
1022 extern pt_export int pt_pkt_sync_set(struct pt_packet_decoder *decoder,
1025 /** Get the current decoder position.
1027 * Fills the current \@decoder position into \@offset.
1033 * Returns -pte_invalid if \@decoder or \@offset is NULL.
1034 * Returns -pte_nosync if \@decoder is out of sync.
1036 extern pt_export int pt_pkt_get_offset(const struct pt_packet_decoder *decoder,
1047 * Returns -pte_invalid if \@decoder or \@offset is NULL.
1048 * Returns -pte_nosync if \@decoder is out of sync.
1051 pt_pkt_get_sync_offset(const struct pt_packet_decoder *decoder,
1054 /* Return a pointer to \@decoder's configuration.
1056 * Returns a non-null pointer on success, NULL if \@decoder is NULL.
1059 pt_pkt_get_config(const struct pt_packet_decoder *decoder);
1061 /** Decode the next packet and advance the decoder.
1063 * Decodes the packet at \@decoder's current position into \@packet and
1064 * adjusts the \@decoder's position by the number of bytes the packet had
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.
1078 extern pt_export int pt_pkt_next(struct pt_packet_decoder *decoder,
1083 /* Query decoder. */
1087 /** Decoder status flags. */
1462 /** Allocate an Intel PT query decoder.
1464 * The decoder will work on the buffer defined in \@config, it shall contain
1465 * raw trace data and remain valid for the lifetime of the decoder.
1467 * The decoder needs to be synchronized before it can be used.
1472 /** Free an Intel PT query decoder.
1474 * The \@decoder must not be used after a successful return.
1476 extern pt_export void pt_qry_free_decoder(struct pt_query_decoder *decoder);
1478 /** Synchronize an Intel PT query decoder.
1482 * If \@decoder has not been synchronized, yet, the search is started at the
1494 * Returns -pte_invalid if \@decoder is NULL.
1496 extern pt_export int pt_qry_sync_forward(struct pt_query_decoder *decoder,
1498 extern pt_export int pt_qry_sync_backward(struct pt_query_decoder *decoder,
1501 /** Manually synchronize an Intel PT query decoder.
1503 * Synchronize \@decoder on the syncpoint at \@offset. There must be a PSB
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.
1518 extern pt_export int pt_qry_sync_set(struct pt_query_decoder *decoder,
1521 /** Get the current decoder position.
1523 * Fills the current \@decoder position into \@offset.
1529 * Returns -pte_invalid if \@decoder or \@offset is NULL.
1530 * Returns -pte_nosync if \@decoder is out of sync.
1532 extern pt_export int pt_qry_get_offset(const struct pt_query_decoder *decoder,
1543 * Returns -pte_invalid if \@decoder or \@offset is NULL.
1544 * Returns -pte_nosync if \@decoder is out of sync.
1547 pt_qry_get_sync_offset(const struct pt_query_decoder *decoder,
1550 /* Return a pointer to \@decoder's configuration.
1552 * Returns a non-null pointer on success, NULL if \@decoder is NULL.
1555 pt_qry_get_config(const struct pt_query_decoder *decoder);
1560 * conditional branch and updates \@decoder.
1569 * Returns -pte_invalid if \@decoder or \@taken is NULL.
1570 * Returns -pte_nosync if \@decoder is out of sync.
1572 extern pt_export int pt_qry_cond_branch(struct pt_query_decoder *decoder,
1578 * branch in \@ip and updates \@decoder.
1587 * Returns -pte_invalid if \@decoder or \@ip is NULL.
1588 * Returns -pte_nosync if \@decoder is out of sync.
1590 extern pt_export int pt_qry_indirect_branch(struct pt_query_decoder *decoder,
1595 * On success, provides the next event \@event and updates \@decoder.
1606 * Returns -pte_invalid if \@decoder or \@event is NULL.
1608 * Returns -pte_nosync if \@decoder is out of sync.
1610 extern pt_export int pt_qry_event(struct pt_query_decoder *decoder,
1632 * Returns -pte_invalid if \@decoder or \@time is NULL.
1635 extern pt_export int pt_qry_time(struct pt_query_decoder *decoder,
1646 * Returns -pte_invalid if \@decoder or \@cbr is NULL.
1649 extern pt_export int pt_qry_core_bus_ratio(struct pt_query_decoder *decoder,
1903 /* Instruction flow decoder. */
1996 /** Allocate an Intel PT instruction flow decoder.
1998 * The decoder will work on the buffer defined in \@config, it shall contain
1999 * raw trace data and remain valid for the lifetime of the decoder.
2001 * The decoder needs to be synchronized before it can be used.
2006 /** Free an Intel PT instruction flow decoder.
2008 * This will destroy the decoder's default image.
2010 * The \@decoder must not be used after a successful return.
2012 extern pt_export void pt_insn_free_decoder(struct pt_insn_decoder *decoder);
2014 /** Synchronize an Intel PT instruction flow decoder.
2018 * If \@decoder has not been synchronized, yet, the search is started at the
2027 * Returns -pte_invalid if \@decoder is NULL.
2029 extern pt_export int pt_insn_sync_forward(struct pt_insn_decoder *decoder);
2030 extern pt_export int pt_insn_sync_backward(struct pt_insn_decoder *decoder);
2032 /** Manually synchronize an Intel PT instruction flow decoder.
2034 * Synchronize \@decoder on the syncpoint at \@offset. There must be a PSB
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.
2046 extern pt_export int pt_insn_sync_set(struct pt_insn_decoder *decoder,
2049 /** Get the current decoder position.
2051 * Fills the current \@decoder position into \@offset.
2057 * Returns -pte_invalid if \@decoder or \@offset is NULL.
2058 * Returns -pte_nosync if \@decoder is out of sync.
2060 extern pt_export int pt_insn_get_offset(const struct pt_insn_decoder *decoder,
2069 * Returns -pte_invalid if \@decoder or \@offset is NULL.
2070 * Returns -pte_nosync if \@decoder is out of sync.
2073 pt_insn_get_sync_offset(const struct pt_insn_decoder *decoder,
2078 * The returned image may be modified as long as no decoder that uses this
2081 * Returns a pointer to the traced image the decoder uses for reading memory.
2082 * Returns NULL if \@decoder is NULL.
2085 pt_insn_get_image(struct pt_insn_decoder *decoder);
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.
2095 * Return -pte_invalid if \@decoder is NULL.
2097 extern pt_export int pt_insn_set_image(struct pt_insn_decoder *decoder,
2100 /* Return a pointer to \@decoder's configuration.
2102 * Returns a non-null pointer on success, NULL if \@decoder is NULL.
2105 pt_insn_get_config(const struct pt_insn_decoder *decoder);
2126 * Returns -pte_invalid if \@decoder or \@time is NULL.
2129 extern pt_export int pt_insn_time(struct pt_insn_decoder *decoder,
2140 * Returns -pte_invalid if \@decoder or \@cbr is NULL.
2143 extern pt_export int pt_insn_core_bus_ratio(struct pt_insn_decoder *decoder,
2156 * Returns -pte_invalid if \@decoder or \@asid is NULL.
2158 extern pt_export int pt_insn_asid(const struct pt_insn_decoder *decoder,
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.
2179 * Returns -pte_invalid if \@decoder or \@insn is NULL.
2181 * Returns -pte_nosync if \@decoder is out of sync.
2183 extern pt_export int pt_insn_next(struct pt_insn_decoder *decoder,
2188 * On success, provides the next event in \@event and updates \@decoder.
2196 * Returns -pte_invalid if \@decoder or \@event is NULL.
2199 extern pt_export int pt_insn_event(struct pt_insn_decoder *decoder,
2204 /* Block decoder. */
2237 * class is not available. The block decoder may choose to not provide
2276 /** Allocate an Intel PT block decoder.
2278 * The decoder will work on the buffer defined in \@config, it shall contain
2279 * raw trace data and remain valid for the lifetime of the decoder.
2281 * The decoder needs to be synchronized before it can be used.
2286 /** Free an Intel PT block decoder.
2288 * This will destroy the decoder's default image.
2290 * The \@decoder must not be used after a successful return.
2292 extern pt_export void pt_blk_free_decoder(struct pt_block_decoder *decoder);
2294 /** Synchronize an Intel PT block decoder.
2298 * If \@decoder has not been synchronized, yet, the search is started at the
2307 * Returns -pte_invalid if \@decoder is NULL.
2309 extern pt_export int pt_blk_sync_forward(struct pt_block_decoder *decoder);
2310 extern pt_export int pt_blk_sync_backward(struct pt_block_decoder *decoder);
2312 /** Manually synchronize an Intel PT block decoder.
2314 * Synchronize \@decoder on the syncpoint at \@offset. There must be a PSB
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.
2326 extern pt_export int pt_blk_sync_set(struct pt_block_decoder *decoder,
2329 /** Get the current decoder position.
2331 * Fills the current \@decoder position into \@offset.
2337 * Returns -pte_invalid if \@decoder or \@offset is NULL.
2338 * Returns -pte_nosync if \@decoder is out of sync.
2340 extern pt_export int pt_blk_get_offset(const struct pt_block_decoder *decoder,
2349 * Returns -pte_invalid if \@decoder or \@offset is NULL.
2350 * Returns -pte_nosync if \@decoder is out of sync.
2353 pt_blk_get_sync_offset(const struct pt_block_decoder *decoder,
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.
2361 * Returns NULL if \@decoder is NULL.
2364 pt_blk_get_image(struct pt_block_decoder *decoder);
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.
2374 * Return -pte_invalid if \@decoder is NULL.
2376 extern pt_export int pt_blk_set_image(struct pt_block_decoder *decoder,
2379 /* Return a pointer to \@decoder's configuration.
2381 * Returns a non-null pointer on success, NULL if \@decoder is NULL.
2384 pt_blk_get_config(const struct pt_block_decoder *decoder);
2405 * Returns -pte_invalid if \@decoder or \@time is NULL.
2408 extern pt_export int pt_blk_time(struct pt_block_decoder *decoder,
2419 * Returns -pte_invalid if \@decoder or \@cbr is NULL.
2422 extern pt_export int pt_blk_core_bus_ratio(struct pt_block_decoder *decoder,
2435 * Returns -pte_invalid if \@decoder or \@asid is NULL.
2437 extern pt_export int pt_blk_asid(const struct pt_block_decoder *decoder,
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.
2459 * Returns -pte_invalid if \@decoder or \@block is NULL.
2461 * Returns -pte_nosync if \@decoder is out of sync.
2463 extern pt_export int pt_blk_next(struct pt_block_decoder *decoder,
2468 * On success, provides the next event in \@event and updates \@decoder.
2476 * Returns -pte_invalid if \@decoder or \@event is NULL.
2479 extern pt_export int pt_blk_event(struct pt_block_decoder *decoder,