- May 16, 2018
-
-
Petr Hosek authored
Change-Id: I0e17099d992c6fddfa68bc9b4e111dd718819cb5
-
- Apr 04, 2018
-
-
Damien Miller authored
Change-Id: I56d41801973e95ce746fdfcf175127669d386589
-
- May 31, 2017
-
-
Doug Evans authored
DNO-96 #done Change-Id: I6f058706b720efe0fc52235b31d7efc15efeb678
-
- Apr 14, 2017
-
-
Doug Evans authored
Change-Id: I5cf4c4a1f73645730e6ca4849286b23e5f14295c
-
- Mar 15, 2017
-
-
Doug Evans authored
Change-Id: I24cec815f6a58a09483059bcc4d978568b305530
-
Doug Evans authored
Change-Id: Ia38c5ca89ff7604aa500e71066e75faf369c78a3
-
Doug Evans authored
Change-Id: Ieb930f70ac3aea332a7a44b69054c514d68b4f6d
-
Doug Evans authored
Change-Id: I698b3085376bf8742d63c2880fa0b4e6261a42f0
-
Doug Evans authored
This cleans up using a callback vs not using a callback. pt_image_read: If sections haven't been loaded then punt to the callback immediately. Otherwise try to fetch the section, and if not mapped again punt to the callback. pt_image_read_cold: Only called if not using a callback, and when called the caller has already moved the desired section to the front of the list. Change-Id: Ibff476acfa96f05b8a9ba526906ecae3ae9f7d09
-
Doug Evans authored
Change-Id: Ie8716eb3f46c6eea7cd400f6ffac7b7ddb2cf0ca
-
- Mar 13, 2017
-
-
Doug Evans authored
Change-Id: I30df39245a591e7672a9afd6ec9e0e6afe817e7d
-
- Feb 23, 2017
-
-
Tim Wiederhake authored
Change-Id: I8bf1574b1c7a92853c568c1710a7ee8ecb26b834 Signed-off-by: Tim Wiederhake <tim.wiederhake@intel.com> Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
- Feb 20, 2017
-
-
Markus Metzger authored
In ptunit-section, we create temporary files and remove them again by calling remove() on the filename while the file is still open. This may cause remove() to fail on some systems. Close the file first. Change-Id: Ie1ea517accbb95e2cbe76345bbdddb55d5865d11 Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
Markus Metzger authored
Do not call a fixture's destructor if initialization failed. This avoids issues with destroying not-yet-initialized fields. We rather leak already-initialized fields. The initializer is really expected to destroy those before reporting the fail. But that doesn't really matter for our tests. Change-Id: I5bb1af5e50a4f7a42576d7d1bf4a0af22ee1e885 Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
Markus Metzger authored
Reduce the size of the block cache used in ptunit-block_cache to 65K entries. Change-Id: I7d6f936243038fc2e891dd5211c14aa89a325186 Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
- Feb 02, 2017
-
-
Markus Metzger authored
This fixes #11. Change-Id: I45a62dbb10ea84e5e408532ff996b2028d85e93b Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
Markus Metzger authored
Change-Id: I6aac5ae1afc4e0c1cd3f42f6a92e9ed22101d537 Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
Markus Metzger authored
Remove the stdlib.h include from intel-pt.h. It isn't really necessary. Include stdlib.h where we actually need it. This fixes #10. Change-Id: Id08b0cd10729312e9b62ba2c33a60329f8657aca Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
- Feb 01, 2017
-
-
Markus Metzger authored
Add new API functions to query the current address-space identifier. Change-Id: Ia997d91c6a0627ce50fbc5d0d92363cca4665aed Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
- Jan 18, 2017
-
-
Markus Metzger authored
Changes: - add a new block decoder layer - add a new image section cache and image section identifiers - add version macros to intel-pt.h - shrink or split existing image sections on overlap - add decoder-specific configuration flags - classify INT, INT1, INT3, and INTO as far calls - classify VMLAUNCH/VMRESUME as far call and VMCALL as far return - improve instruction length decode performance - fix an issue with instructions overlapping image section boundaries - fix an off-by-one end of trace indication - fix a bug with TMA for low MTC frequencies - ptunit: - avoid using mktempname - fix leaking of temporary files - ptdump: - fix an issue with ':' in filenames - ptxed: - allow an offset or range for raw binary files (--raw) - add --stat:insn and --stat:block to count instructions and blocks - add --block:show-blocks to print blocks - add --time to print the estimated TSC at each instruction - add --check to check instruction decode and classification against XED - fix an issue with ':' in filenames - fix a bug with --stat without --quiet - pttc: - fix a few memory leaks Change-Id: Ie810479b6a73fb8743efec56b686a53d8b4bec7d Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
Markus Metzger authored
The comment on struct pt_event.variant.enabled.ip lacks the leading ** marking it as a doxygen comment. Add it. Change-Id: I233f75eec69fd302cdfa99ac36ba3ec4a19d5f40 Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
Markus Metzger authored
Change-Id: I02cabf7737ef4ff5be113ba3ded21b0ae8308fa8 Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
Markus Metzger authored
Add a new option --check that performs some checks. If --insn-decoder is specified, we check that: - XED can decode each instruction - an instruction's class matches XED's categorization If --block-decoder is specified, we check that: - XED can decode each instruction - we reach the block's end IP - the last instruction's class (if available) matches XED's categorization The --check option can be combined with --quiet to only print error messages. Change-Id: I2730384f9257469cb7401eeff4e4a717ecadd5dc Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
Markus Metzger authored
When we print a block, we update block.ninsn and block.ip in order to get the IP for reporting decode errors right. This has been addressed in the previous patch so we can now stop updating block. Change-Id: Ieffa51dfc5006c015dafe6278e3718d495ccccb6 Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
Markus Metzger authored
When diagnosing block decode or control-flow reconstruction errors, we report "block.ip + block.ninsn" as IP, where the latter is omitted if it is zero. Change this to use the current IP while printing for diagnosing control-flow reconstruction errors and block.end_ip or the next IP for diagnosing block decode errors depending on the erro type. This improves error reporting when --quiet is specified and further frees us from having to update block.ip and block.ninsn during printing. Change-Id: I906bdd18411e092019f19de40bc7bd51162fa225 Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
Markus Metzger authored
In case of errors when trying to fetch an instruction, ptxed will print the error without the IP of the instruction it failed to fetch. Reorder the code to first print the optional offset and time and the IP. Change-Id: Ic5ee512eb55577e0ab12d88611613b8fc6579b23 Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
Markus Metzger authored
Extract the code for fetching an instruction from a block into a separate function. We will need it in a few more places. Change-Id: Ibe676184f37f8328a4b684ff7d13a6d38fe8aa82 Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
Markus Metzger authored
In most cases the block decoder knows the instruction class of the instruction that ended the block. Provide it to save our callers the effort of decoding the instruction in some cases. If it doesn't know the instruction class, set it to ptic_error and leave it to our callers to decide whether they need to decode the last instruction. Change-Id: I4174b628377635ccce0d5d8a8ebe71853592782c Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
Markus Metzger authored
We classify VMLAUNCH/VMRESUME as far call and VMCALL as far return. This is from a VMM's perspective that is calling into guests. This is the opposite of how we handle OS calls where we treat SYSENTER as far call and SYSEXIT as far return. Change the VMX classification to align the two, i.e. classify VMLAUNCH/VMRESUME as far return and VMCALL as far call. Change-Id: I1a914d6c26a5807f820038390cfa3c0847b84071 Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
Markus Metzger authored
Software interrupts (INT, INT1, INT3, INTO) are used for software breakpoints and for system calls. The former are typically patched in and removed again before trace decode. The latter remain in the code. They are currently classified as 'other'. Classify software interrupts as far calls similar to SYSCALL and SYSENTER. Change-Id: I8aedaa8bded0215e04c3b797445ffc866700d6c9 Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
Markus Metzger authored
Software interrupts receive FUP(CLIP) + TIP(BLIP?) We can not reliably determine whether the FUP/TIP belongs to the software interrupt or to an asynchronous interrupt that was taken before the instruction. To distinguish the two cases we would need to read ahead but that may require decoding an unknown amount of code (in the kernel or hypervisor or even in different processes) until we return either to CLIP if it was an asynchronous interrupt or to NLIP (or even to a later IP) if it wasn't. Instead, we assume that it was an asynchronous interrupt. Control appears to flow from before the software interrupt instruction to the interrupt handler and back after the instruction. This is wrong most of the time. But it is predictably wrong and it avoids the case where we incorrectly assume a synchronous transfer and get out of sync when we see the FUP/TIP for the software interrupt. Update our tests to show the correct trace and the incorrect control flow. Later patches may add heuristics that read ahead a little bit. Change-Id: I17849efe3d51d24ace5df00ddda8bd1573b11f7d Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
- Jan 17, 2017
-
-
Markus Metzger authored
We leak the trace buffer allocated in load_pt(). Fix it. Change-Id: I2a3c35646442c65c2e364bb405be014bc0f2ab0a Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
Markus Metzger authored
In p_alloc(), we allocate p->pt_labels, yet we forget to free it again in p_free(). Fix it. Change-Id: Iab6dda8a03e26708722e88952a31ba0cd680d75a Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
Markus Metzger authored
In yasm_alloc(), we allocate y->fileroot, yet we forget to free it again in yasm_free(). Fix it. Change-Id: Ibd68836602d7bfccbe2c15ef0cfe33b807827cf8 Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
- Jan 04, 2017
-
-
Markus Metzger authored
When synchronizing onto the trace stream, either initially or after a packet decode error, ptdump diagnoses a -pte_eos return as a sync error. Stop doing that. Change-Id: I75edbb0ed08dfda7568589bfae845bb13d14b8dc Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
Markus Metzger authored
Add a new option --time to print the current time between (optional) offset and instruction address. Just like the offset, the time may be ahead sometimes since the underlying decoder is reading ahead to the next query-relevant packet. Change-Id: Ide2f1c4ab83b73ed9fc0604df67ff1a2f33ef2f7 Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
- Jan 03, 2017
-
-
Markus Metzger authored
Change-Id: Ib557e360e8493a2cf4f2134ddf9a9e4e0b0c5564 Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
- Dec 01, 2016
-
-
Markus Metzger authored
Add two new macros LIBIPT_VERSION_MAJOR LIBIPT_VERSION_MINOR derived from the corresponding cmake variables PT_VERSION_MAJOR PT_VERSION_MINOR and a third macro LIBIPT_VERSION that gives the entire version in a single integer constant. This simplifies checking for new API bits. Change-Id: I0e212164d969ec94f79221b72f3eec88805db5af Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
- Nov 24, 2016
-
-
Markus Metzger authored
Add a ptxed option for setting the end-on-call block decoder option. This allows testing the latter. Change-Id: Ia01c448519035f5bb2e564a8d32f1bcca22860cf Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-
Markus Metzger authored
Add a new block decoder option to end a block after a call instruction. This is useful if you are interested in calls and rets so you only ever need to look at the last intruction of a block - or the first, depending on your interest. Change-Id: I7f27e32a11492ea02abad4d032246d97acce33a0 Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
-