HOME

TheInfoList



OR:

ProbeVue is IBM's implementation of a lightweight dynamic
tracing Tracing may refer to: Computer graphics * Image tracing, digital image processing to convert raster graphics into vector graphics * Path tracing, a method of rendering images of three-dimensional scenes such that the global illumination is faithf ...
environment introduced in
AIX Aix or AIX may refer to: Computing * AIX, a line of IBM computer operating systems *An Alternate Index, for a Virtual Storage Access Method Key Sequenced Data Set * Athens Internet Exchange, a European Internet exchange point Places Belgi ...
version 6.1. ProbeVue provides the ability to probe running processes in order to provide statistical analysis as well as retrieve data from the probed process. The dynamic nature of ProbeVue allows it to be used as a global system performance tool while retaining the ability to drill into very specific events on a single process or thread. Because modifications are not required of a probed process or system and the lightweight design of ProbeVue as a tracing tool, it is suitable for use in a production environment where previous tracing tools would have been performance prohibitive.


Description

ProbeVue provides a series of probe point specifications that are potential events that can be probed. A script written in the Vue language allows the user to define a probe that is a block of code called an action block that will run when those events occur on the system. The execution of the action block can be limited to specific events by use of a conditional statement placed on the probe called a predicate. The code in the action block follows a C-like syntax with a limited set of built in functions. The following is an example of a probe that is defined for whenever a process with a PID of 123456 enters the read() system call. When that event happens this script will call the built-in printf() function to print a message to its output trace buffers. The first line in the action block is a C-style comment and therefore will not execute in the ProbeVue environment. @@syscall:*:read:entry when ( __pid

123456)
Probes like the above sample can be written and run without the extensive testing normally required of a production system. The ProbeVue environment protects the user from errant code or resource hungry tracing frequently seen with previous IBM tracing tools. The runtime compile feature of ProbeVue provides a powerful ''ad hoc'' environment for data gathering.


Probe point specifications

Currently IBM provides the following probe providers on AIX 6.1: syscall, uft, interval, trace, and the probevue probes (BEGIN and END). The syscall provider defines probe points for a subset of the available system calls. User Function Tracing (uft) probes can be defined for entry points of functions defined in a C or
C++ C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
program. Both syscall and uft probes must include a valid function prototype in the Vue script before function parameters (for the entry probes) or return values (for syscall exit probes only) can be accessed. The interval probes fire on a timer and can be defined on 100 millisecond intervals. The trace provider allows ProbeVue to access traditional trace hooks. Finally the probevue probes called BEGIN and END will fire as the probevue environment itself starts and exits.


The Vue language

Because ProbeVue is designed as a tool to monitor operating system events, the Vue language uses an event driven style that is used to describe how to process data derived from these events. Like most dynamic tracing languages found on other Unices, the Vue language has a C-like syntax and is frequently presented in this context. Vue's relationship to C has many parallels but deviates most significantly from the imperative nature of C. Some of the contrasts and similarities are shown here.


Data types

Because ProbeVue is used to monitor applications written primarily in C, it supports all C data types as well as C data structures. Vue also supports a String, list, and time stamp data types. The String and list types are both actually
arrays An array is a systematic arrangement of similar objects, usually in rows and columns. Things called an array include: {{TOC right Music * In twelve-tone and serial composition, the presentation of simultaneous twelve-tone sets such that the ...
, while the time stamp is a high resolution representation of a point in time. Type casting and automatic type promotion during operations with mixed types is similar to C behavior as well. Pointers to arrays and data structures behave in ProbeVue the same as they would in a C program, with the key difference from C is that when pointers refer to a location in memory they are referencing a location in another process space. To access that memory it is necessary to first copy the memory location into the local ProbeVue environment. If the memory has been paged out, ProbeVue cannot force a
page fault In computing, a page fault (sometimes called PF or hard fault) is an exception that the memory management unit (MMU) raises when a process accesses a memory page without proper preparations. Accessing the page requires a mapping to be added to t ...
to access it. Another difference is that the size of pointers in C are determined at compile time, while in ProbeVue they are determined by the 32 or 64 bitness of the application that is probed. Floating point data types are valid data types for assignment from a probed process, but cannot be used for floating point mathematical operations.


Data classes

Vue uses scoping rules similar to C, but must also account for the externally derived nature of much of the data in probes. As a result, not all data classes are available or relevant in all probes or all portions of a View script. The basic classifications of data are as follows. : globals - Variables that have scope across the entire Vue script :shell - Variables that follow shell conventions and are read from the Unix environment :
kernel Kernel may refer to: Computing * Kernel (operating system), the central component of most operating systems * Kernel (image processing), a matrix used for image convolution * Compute kernel, in GPGPU programming * Kernel method, in machine learnin ...
- Variables that are provided by the kernel :local - Variables that are local to a probe action block :thread local - Variables that are local to a thread, but have scope across multiple probe action blocks :entry/exit - Variables that are defined by, and local to, the probe :built in - Pre defined variables that have values relevant to the current firing probe


Operators

Vue
operators Operator may refer to: Mathematics * A symbol indicating a mathematical operation * Logical operator or logical connective in mathematical logic * Operator (mathematics), mapping that acts on elements of a space to produce elements of another sp ...
follow C conventions closely with the exception of when used with strings. When used with strings, the + operator performs concatenation, and the

operator is used for comparisons.


Flow control

Vue does not allow the definition of user functions,
recursion Recursion (adjective: ''recursive'') occurs when a thing is defined in terms of itself or of its type. Recursion is used in a variety of disciplines ranging from linguistics to logic. The most common application of recursion is in mathematics ...
, or looping constructs but does offer conditional if-then expressions within a probe action block. The lightweight nature of ProbeVue prohibits a Vue script from defining expensive looping or extensive branching operations that could degrade performance.


Tentative tracing

Tentative tracing is a concept that allows the trace output of a block of code to be labeled as tentative. The output of this code can later be committed to the trace buffers as visible output or it can be discarded. This works conceptually much like transaction controls in SQL.


Usage

A Vue script can be invoked with interpreter
magic Magic or Magick most commonly refers to: * Magic (supernatural), beliefs and actions employed to influence supernatural beings and forces * Ceremonial magic, encompasses a wide variety of rituals of magic * Magical thinking, the belief that unrela ...
and set executable like a shell script or can be run as input to the probevue command in the form of a command line parameter or stdin input. By convention, Vue scripts have a .e filename extension.


Deficiencies

The Vue language lacks aggregations and instead uses a list data type that offers similar yet limited functionality. The equivalent product from
Solaris Solaris may refer to: Arts and entertainment Literature, television and film * ''Solaris'' (novel), a 1961 science fiction novel by Stanisław Lem ** ''Solaris'' (1968 film), directed by Boris Nirenburg ** ''Solaris'' (1972 film), directed by ...
called
DTrace DTrace is a comprehensive dynamic tracing framework originally created by Sun Microsystems for troubleshooting kernel and application problems on production systems in real time. Originally developed for Solaris, it has since been released under ...
offers an aggregation data type and a powerful set of aggregating functions to represent statistical data. The list data type offers only basic aggregating functions on a single item (as opposed to an
associative array In computer science, an associative array, map, symbol table, or dictionary is an abstract data type that stores a collection of (key, value) pairs, such that each possible key appears at most once in the collection. In mathematical terms an as ...
s of aggregations that DTrace offers). The list data type offers a slight simplification over keeping the stats manually but does not allow the list to be reset (say, over an interval) that can easily be done when using manual summaries and basic types. IBM has committed to associative arrays on future versions of the Vue language. Because of the long development lead time DTrace has over ProbeVue, DTrace has considerably more probe point specifications.These are called Providers in DTrace. IBM has plans to add a considerable number of new probe points in future technology level releases of AIX 6.1 and in the next major AIX release.


See also

*
DTrace DTrace is a comprehensive dynamic tracing framework originally created by Sun Microsystems for troubleshooting kernel and application problems on production systems in real time. Originally developed for Solaris, it has since been released under ...
* SystemTap


References

{{reflist


External links


ProbeVue: Extended Users Guide Specification

ProbeVue QuickSheet



DeveloperWorks article on ProbeVue




IBM operating systems