# Trace tree

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Trace_tree
> Markdown URL: https://mediated.wiki/source/Trace_tree.md
> Source: https://en.wikipedia.org/wiki/Trace_tree
> Source revision: 1264817378
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

A '''trace tree''' is a [data structure](/source/data_structure) that is used in the runtime compilation of [programming code](/source/programming_code). Trace trees are used in [tracing just-in-time compilation](/source/tracing_just-in-time_compilation) where [tracing](/source/tracing_(software)) is used during code execution to look for [hot spot](/source/hot_spot_(computer_programming))s before compilation. When those hot spots are entered again the compiled code is run instead. Each statement executed is traced, including within other [function call](/source/function_call)s, and the entire execution path is compiled. This is different from compiling individual functions. More information can be gained allowing better [compiler optimization](/source/compiler_optimization)s, including the removal of some function call overhead. The interpreter is called to continue whenever compiled code makes calls to code outside the compilation contexts.

==References==
*{{Citation
  | last1 = Bala  | first1 = Vasanth
  | last2 = Duesterwald | first2 = Evelyn
  | last3 = Banerjia | first3 = Sanjeev
  | title = Transparent Dynamic Optimization: The Design and Implementation of Dynamo
  | date = June 1999
  | url = https://www.hpl.hp.com/techreports/1999/HPL-1999-78.html
  | access-date = 2020-12-18
   }}
*{{Citation
  | last1 = Gal  | first1 = Andreas | author-link1 = Andreas Gal
  | last2 = Franz | first2 = Michael | author-link2 = Michael Franz
  | title = Incremental Dynamic Code Generation with Trace Trees
  | date = November 2006
  | s2cid = 9352256
  | citeseerx = 10.1.1.113.557
  | url = https://static.aminer.org/pdf/PDF/000/286/022/profile_driven_generation_of_trace_samples.pdf
 <!-- | url = http://www.ics.uci.edu/~franz/Site/pubs-pdf/ICS-TR-06-16.pdf -->
  | access-date = 2020-12-18
   }}
*{{Citation
  | last1 = Gal  | first1 = Andreas | author-link1 = Andreas Gal
  | last2 = Bebenita | first2 = Michael
  | last3 = Chang | first3 = Mason
  | last4 = Franz | first4 = Michael | author-link4 = Michael Franz
  | title = Making the Compilation "Pipeline" Explicit: Dynamic Compilation Using Trace Tree Serialization
  | date = October 2007
  | s2cid = 14848180
  | citeseerx = 10.1.1.85.2412
  }}
*{{Citation
  | title = Quick Introduction to Tamarin Tracing
  | last = Double | first = Chris
  | date = February 2008
  | url = https://bluishcoder.co.nz/2008/05/20/quick-introduction-to-tamarin-tracing.html
  | access-date = 2020-12-18
   }}
*{{Citation
  | title = The Difference Between Extended Basic Blocks and Traces
  | last = Chang | first = Mason
  | work = Hacking With Caffeine | date = January 12, 2009
  | url = http://www.masonchang.com/blog/2009/1/13/the-difference-between-extended-basic-blocks-and-traces.html
  | archive-url = https://web.archive.org/web/20200129165114/http://www.masonchang.com/blog/2009/1/13/the-difference-between-extended-basic-blocks-and-traces.html
  | archive-date = 2020-01-29
   }}
*{{Citation
  | title = PyPy Blog: Applying a Tracing JIT to an Interpreter
  | last = Bolz | first = Carl Friedrich
  | date = March 2, 2009
  | url = https://morepypy.blogspot.com/2009/03/applying-tracing-jit-to-interpreter.html
  | access-date = 2020-12-18
   }}

Category:Compiler construction
Category:Trees (data structures)

---
Adapted from the Wikipedia article [Trace tree](https://en.wikipedia.org/wiki/Trace_tree) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Trace_tree?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
