Section: PARSEC Hooks Instrumentation API (7)
Updated: December 2008
Return to Main Contents
hooks - The PARSEC Hooks Instrumentation API
The PARSEC hooks are a set of functions which are called at specific locations
by the workloads of the PARSEC benchmark suite. They signal that the workload
has entered a new phase with its computations. By providing suitable function
bodies PARSEC users can use the hooks to plug in any type of functionality at
the desired code locations at build time.
The PARSEC hook functions also define a Region-of-Interest for each workload.
This code region is the part of the workload which performs the "interesting"
computations. It includes the whole parallel phase, but not the initialization
and cleanup functionality. Researchers should eliminate the impact of
initialization and cleanup to avoid distortions of their measurements.
The PARSEC Hooks API currently includes the following function prototypes:
- void __parsec_bench_begin (enum __parsec_benchmark __bench)
Executed at the beginning of the workload. __bench is a unique workload
identifier passed to the hooks implementation by the executing benchmark
- void __parsec_bench_end ()
Executed at the end of the workload.
- void __parsec_roi_begin ()
Executed at the beginning of the Region-of-Interest of the workload.
- void __parsec_roi_end ()
Executed at the end of the Region-of-Interest of the workload.
The default implementation of the hooks function is provided by the hooks
package. It includes several basic features which can be enabled at build time.
The hooks package can be found in the subdirectory pkgs/libs/hooks
of the PARSEC distribution.
To enable the hook function calls the PARSEC workloads have to be compiled with
the macro ENABLE_PARSEC_HOOKS defined. The build configuration gcc-hooks
does that by default.
The hooks package can be customized by editing the config.h header
file in the src/ directory of the package. Detailed information about all
supported features can be found in the package documentation.
Header file of the hooks package with full API specification.
Configuration file of the hooks package.
Default implementation of the hooks function calls. Can be customized
with the config.h header file.
If enabled then the PARSEC hooks library adds support for thread affinity
to all workloads. By default the mapping of threads to CPUs can then be
controlled with the following environment variables:
The maximum number of CPUs to use. Notice that this does not guarantee
exclusive access to these CPUs.
The ID of the base CPU to use. The workload will not use any CPUs below that
ID. Together with PARSEC_CPU_NUM a logical slice can be defined in which
the workload will execute.
Written by Christian Bienia.
Copyright (c) 2006-2009 Princeton University
- SEE ALSO
This document was created by
using the manual pages.
Time: 04:41:54 GMT, February 24, 2009