The Sneezy event model defines the manner in which events, data, and control flow between the program, the agent, and the tools.
The computational model targeted by Sneezy is SPMD/ MIMD. A computation is divided into contexts (address spaces), each of which has one or more threads of computation. In the current system, we assume that a barrier synchronization is program-wide, but by adopting the concept of a collector as originally proposed for HPC++ , this restriction could be relaxed. Events occur at (thread,location) pairs. Clients enable and disable event pairs by invoking procedures in the agent, which performs instrumentation of the running program.
When an event occurs, notification is sent via the agent to the client. If the event carries data local to the thread, it is collected and sent along with the notification. The BEGINRPC event, for example, carries a global pointer to the element which is the target of the service request, a global pointer to the parameter buffer, an integer which is the length of that buffer, and the function code of the remote function. Once an event is signaled, the running thread suspends its computation and enters a command loop controlled by the client (through the agent). The client can further instrument the thread, inspect its address space, and call functions in the thread's context. Eventually the client passes control back to the thread, which continues its computation.
Sneezy events most often correspond to language-level events in the source language (pC++), although they do not necessarily correspond to events in the source text because event points may be hidden in the runtime libraries. For example, if the BEGINBARRIER event is enabled, it will be signaled even if the barrier is inside a system subroutine. The use of ``bracketed'' (BEGIN/END pairs) events makes it possible to filter unwanted events. Thus, for example, a client may want to ignore all events between BEGINCREATECOLLECTION and ENDCREATECOLLECTION on the assumption that they are system-internal.
The commands currently supported by Sneezy include CONTINUE, TERMINATE, INSTALL-HANDLER, UNINSTALL-HANDLER, READ-DATA, WRITE-DATA, and CALL-USER-FUNCTION. Of particular interest is INSTALL-HANDLER, which takes a context ID, a thread ID, an event type, and an event ID. INSTALL-HANDLER enables the event in the given context and thread in such a way that when the event is signaled, its ID is sent to the client that installed the handler.