HOOKS

Section: PARSEC Hooks Instrumentation API (7)
Updated: December 2008
Index Return to Main Contents
 

NAME

hooks - The PARSEC Hooks Instrumentation API  

DESCRIPTION

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 program.
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.  

USAGE

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.  

FILES

src/include/hooks.h
Header file of the hooks package with full API specification.
src/config.h
Configuration file of the hooks package.
src/hooks.c
Default implementation of the hooks function calls. Can be customized with the config.h header file.
 

ENVIRONMENT

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:
PARSEC_CPU_NUM
The maximum number of CPUs to use. Notice that this does not guarantee exclusive access to these CPUs.
PARSEC_CPU_BASE
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.
 

AUTHOR

Written by Christian Bienia.  

COPYRIGHT

Copyright (c) 2006-2009 Princeton University  

SEE ALSO

parsec(7), __parsec_bench_begin(3), __parsec_bench_end(3), __parsec_roi_begin(3), __parsec_roi_end(3), hooks.h(3), config.h(3), hooks.c(3)


 

Index

NAME
DESCRIPTION
USAGE
FILES
ENVIRONMENT
AUTHOR
COPYRIGHT
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 04:41:54 GMT, February 24, 2009