Each feature is responsible for providing its own set of handlers. Types of handler are:
"ext_init" handles initialization of an extended feature. It takes
"args" parameter which is passed in through the "oprofiled --ext-feature=<
extended-feature-name>:[args]". This handler is executed in the function
opd_options()
in the file daemon/oprofiled.c
.
The ext_init handler is required for all features.
"ext_print_stats" handles the extended feature statistics report. It adds
a new section in the OProfile daemon statistics report, which is normally
outputed to the file
/var/lib/oprofile/samples/oprofiled.log
.
This handler is executed in the function opd_print_stats()
in the file daemon/opd_stats.c
.
"ext_sfile" contains a set of handlers related to operations on the extended
sample files (sample files for events related to extended feature).
These operations include create_sfile()
,
sfile_dup()
, close_sfile()
,
sync_sfile()
, and get_file()
as defined in daemon/opd_sfile.c
.
An additional field, odb_t * ext_file
, is added to the
struct sfile
for storing extended sample files
information.