For faster navigation, this Iframe is preloading the Wikiwand page for Branch trace.

Branch trace

Branch trace is a computer program debugging tool or analysis technique. It is an abbreviated instruction trace in which only the successful branch instructions are recorded. On IBM System/360 this was implemented as part of Program-Event Recording (PER)[1] but was seldom used at the application programming level. Program Event Recording hardware was used and due to the overhead of this tool, it was removed from customer-available MVS systems.

Branch tracing is also available for Pentium 4, Xeon and later Intel processors.[2] There are dedicated processor commands to enable branch tracing and save executed branches into special Intel Branch Trace Store (BTS) area of resident memory. The Branch Trace Store can be also configured to be a circular buffer, so that last executed branches are recorded. Branch tracing on Intel processors using the Branch Trace Store can cause 40x application run-time slow down.[3] For the Intel Core M and the 5th Generation of Intel Processors, Intel PT (Processor Trace) has been introduced, which aims to provide a full control flow trace. Intel PT is said to have only a minimum impact on the program's execution (< 5%).[4]

Use

With the availability and reference to a compiler listing of the program together with a branch trace, the full path of executed instructions can be reconstructed. With a lot more effort, the full path can even be reconstructed with a memory dump (containing the program storage) and a branch trace.

Alternatives

A more comprehensive trace of all the instructions (including instructions between branches) can be obtained by the use of an instruction set simulator (where available on some platforms). A full instruction trace can provide additional information such as address/length and value of memory alterations.

See also

References

  1. ^ "IBM Knowledge Center". publib.boulder.ibm.com.[permanent dead link]
  2. ^ IA-32 Intel® Architecture Software Developer’s Manual (ftp://download.intel.com/support/processors/celeron/sb/6.pdf[permanent dead link]), Volume 3B: System Programming Guide, Part 2, Chapter 18.4 Last branch recording overview.
  3. ^ Exploiting Hardware Advances for Software Testing and Debugging (NIER Track), by Mary Lou Soffa, Kristen R. Walcott, Jason Mars, in Proceedings of ICSE, 2011. See Chapter 4.2 Branch Trace Store.
  4. ^ Intel® 64 and IA-32 Architectures Software Developer’s Manual, See Chapter 35 Intel Processor Trace.
{{bottomLinkPreText}} {{bottomLinkText}}
Branch trace
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?