Jump to content

Hot spot (computer programming)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by ROxBo (talk | contribs) at 10:30, 10 March 2009 (create page). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Definition

The most usual definition of a hot spot in computer science is a region of a computer program where the highest number of executed instructions occurs or where most time is spent during the programs execution (not necessarily the same thing since some instructions are faster than others).

If a program is stopped randomly, the program counter (the pointer to the next instruction to be executed) is frequently found to contain the address of an instruction within a certain range, possibly indicating code that is in need of optimization or even indicating the existence of a 'tight' CPU loop. See Performance analysis. This simple technique can actually be used as a method of detecting instructions that are high usage, although somewhat more sophisticated methods, such as instruction set simulators or performance analyzers achieve this more accurately and consistently.

History of hot spot detection

Renowned computer scientistDonald Knuth described his first encounter with what he refers to as a jump trace in an interview for "Dr. Dobb's Journal" in 1996

[1] saying:

"..... In the ’60s, someone invented the concept

of a ‘jump trace.’ This was a way of altering the machine language of a program so it would change the next branch or jump instruction to retain control, so you could execute the program at fairly high speed instead of interpreting each instruction one at a time and record in a file

just where a program diverged from sequentiality. By processing this file you could figure out where the program was spending most of its time. So the first day we had this software running, we applied it to our Fortran compiler supplied by, I suppose it was in those days, Control Data Corporation. We found out it was spending 87 percent of its time reading comments! The reason was that it was translating from one code system into another into another."

See also

Hot spot analyzers

References