Patent ID: 8074207

Claim:
A computer-implemented method, comprising: obtaining an application for execution, the application comprising a plurality of machine-independent first instructions; identifying regions of the first instructions that implement one or more programming language methods, functions, or flow control structures; translating the first instructions into corresponding machine-dependent second instructions for a target machine; instrumenting the second instructions to include sampling instructions for the identified regions, the sampling instructions configured to cause generation of a state sample when an identified region is executed, each state sample including a time stamp and an identification of a currently executing method or function; executing the second instructions in order to execute the application, the second instructions executed in a process or thread; and during the executing, executing application profiling instructions for (i) collecting and (ii) processing each generated state sample, and for (iii) presenting, in real time with the execution, application profile information based on the collected and processed samples on a display device, wherein the collection, processing and presentation of the profile information are performed in the process or thread in which the second instructions are executed.