ktf/igprof — pull request #31 by mkurkela (2013-06-07 10:56:16+00:00)
Title: Instrument multiple functions and count calls of user given "enter"

and "exit" functions.

> igprof --fm-int FUNCTION1:LIBRARY1,FUNCTION2:LIBRARY2... (instruments
functions that pass return value in %rax register. Max 10 functions)
> igprof --fm-regexp LIBRARY1:LIBRARY2:LIBRARY3... REGEXP (instruments
functions that can be found in given libraries and match to REGEXP.
Function need to return value in %rax register (Max 10 functions)
> igprof --fm-double FUNCTION1:LIBRARY1,FUNCTION2:LIBRARY2...(instruments
functions that return value %XMM0 register.
> igprof --fm-regexp-double LIB1:LIB2:... REGEXP (insrtuments functions
that can be found from given libraries and match to regexp. Adds a
hook that return value from %XMM0 register.

All the functions increment the same counter.

> igprof --fenter-exit ENTERFUNCTION:LIBRARY EXITFUNCTION:LIBRARY
> igprof --fenter-exit-regexp LIB1:LIB2... REGEXP1 REGEXP2
> igprof --fenter-exit-regexp-double LIB1:LIB2... REGEXP1 REGEXP2
Counts calls to given functions. User can specify up to 10 enter functions and
10 exit functions. Functions should return value in %rax register.
Regexp version check symbols from given libraries and hook it if match.
REGEXP1 is for enter functions and REGEXP2 for exit.

Enter functions share one call counter and exit functions share another counter.

In all regexp versions the regexp is given to grep as it is written

-------------------------------------------------------------------------
The x86 instruction length decoder has a new design. More supported instructions
added and the length lookup is now done trough opcode map tables.