Instrumentation (computer programming): Difference between revisions

Content deleted Content added
m Repairing 2 external links using Checklinks
removed repeated text
 
(46 intermediate revisions by 38 users not shown)
Line 1:
{{Short description|Modification of software to allow for analysis}}
In context of [[computer programming]], '''instrumentation''' refers to an ability to monitor or measure the level of a product's performance, to diagnose errors and writing trace information. Instrumentation is in the form of code instructions that monitor specific components in a system (for example, instructions that output logging information appear on screen). When an application contains instrumentation code, it can be managed using a management tool. Instrumentation is necessary to review the performance of the application. Instrumentation approaches can be of two types, source instrumentation and binary instrumentation. In programming, instrumentation means the ability of an application to incorporate:
{{more footnotes|date=December 2013}}
In [[computer programming]], '''instrumentation''' is the act of modifying software so that [[analysis]] can be performed on it.<ref>A. Sabetta and H. Koziolek, “Measuring Performance Metrics: Techniques and Tools,” in Dependability metrics. Springer, 2008, pp. 226–232.</ref>
 
Generally, instrumentation either modifies [[source code]] or [[binary code]]. Execution environments like the JVM provide separate interfaces to add instrumentation to program executions, such as the [[Java_Virtual_Machine_Tools_Interface|JVMTI]], which enables instrumentation during program start.
* Code [[Tracing (software)|tracing]] - receiving informative messages about the execution of an application at run time.
 
* [[Debugging]] and (structured) [[exception handling]] - tracking down and fixing programming errors in an application under development.
Instrumentation enables [[profiling (computer programming)|profiling]]: <ref>{{cite web|url=http://www.drdobbs.com/architecture-and-design/commenting-testing-and-instrumenting-cod/229300224|title=Commenting, Testing, and Instrumenting Code|work=Dr. Dobb's |date=January 3, 2011|accessdate=January 29, 2014}}</ref>
* Performance counters - components that allow you to track the performance of the application.
measuring dynamic behavior during a test run. This is useful for properties of a program that cannot be [[static program analysis|analyzed statically]] with sufficient precision, such as [[software performance|performance]] and [[alias analysis]].
* [[Data logger|Event logs]] - components that allow you receive and track major events in the execution of the application.
 
[[fr:Instrumentation ducan code source]]include:
* [[Tracing (software)|Logging events]] such as failures and operation start and end <ref>[http://pic.dhe.ibm.com/infocenter/rtrthelp/v8r0m0/index.jsp?topic=%2Fcom.ibm.rational.testrt.doc%2Ftopics%2Fcinstruovw.html Source Code Instrumentation Overview at IBM website]</ref>
* Measuring and logging the duration of operations
 
== Limitations ==
 
Instrumentation is limited by execution coverage. If the program never reaches a particular point of execution, then instrumentation at that point collects no data. For instance, if a word processor application is instrumented, but the user never activates the print feature, then the instrumentation can say nothing about the routines which are used exclusively by the printing feature.
 
Instrumentation increases the execution time of a program. In some contexts, this increase might be dramatic and hence limit the application of instrumentation to debugging contexts. The instrumentation overhead differs depending on the used instrumentation technology.<ref>Reichelt, D. G., Bulej, L., Jung, R., & van Hoorn, A. (2024, May). Overhead Comparison of Instrumentation Frameworks. In Companion of the 15th ACM/SPEC International Conference on Performance Engineering (pp. 249-256).</ref>
 
==See also==
* [[Hooking]] – range of techniques used to alter or augment the behavior of an operating system, of applications, or of other software components by intercepting function calls or messages or events passed between software components.
* [[Instruction set simulator]] - simulation of all instructions at machine code level to provide instrumentation
* [[Runtime intelligence]] - technologies, [[managed services]] and practices for the collection, integration, analysis, and presentation of application usage levels, patterns, and practices.
* [[Software performance analysis]] - techniques to monitor code performance, including instrumentation.
* [[Hardware performance counter]]
* [[DTrace]] – A comprehensive dynamic tracing framework for troubleshooting kernel and application problems on production systems in real time, implemented in [[Solaris (operating system)|Solaris]], [[macOS]], [[FreeBSD]], and many other platforms and products.
* [[Java Management Extensions|''Java Management Extensions'' (JMX)]] – Java technology for managing and monitoring applications, system objects, devices (such as printers), and service-oriented networks.
* [[Application Response Measurement]] – standardized instrumentation [[Application programming interface|API]] for [[C (programming language)|C]] and [[Java (programming language)|Java]].
* [[Dynamic recompilation]] – a feature of some emulators and virtual machines where the system may recompile some part of a program during execution.
 
==References==
{{reflist}}
* [http://msdn.microsoft.com/en-us/library/aa983649(VS.71).aspx Introduction to Instrumentation and Tracing: Microsoft Developer Network]
* [httphttps://developer.apple.com/library/maccontent/#documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/Introduction/Introductionindex.html Apple Developer Tools: Introduction to Instruments]
* [http://sourceware.org/systemtap/ SystemTap] provides free software (GPL) infrastructure to simplify the gathering of information about the running Linux system.
* [https://github.com/corelight/cwrap cwrap] Auto wrap C and C++ functions with instrumentation.
 
[[Category:Software optimization]]
Line 20 ⟶ 41:
[[Category:Debugging]]
 
* [http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/Introduction/Introduction.html Apple Developer Tools: Introduction to Instruments]
 
{{Comp-sci-stub}}
[[de:Instrumentierung (Softwareentwicklung)]]
[[fr:Instrumentation du code source]]
[[ru:Инструментирование (программирование)]]