1bcefe12eSTom ZanussiPerf-Trace-Util version 0.01
2bcefe12eSTom Zanussi============================
3bcefe12eSTom Zanussi
4765532c8SArnaldo Carvalho de MeloThis module contains utility functions for use with perf script.
5bcefe12eSTom Zanussi
6d1b93772STom ZanussiCore.pm and Util.pm are pure Perl modules; Core.pm contains routines
7d1b93772STom Zanussithat the core perf support for Perl calls on and should always be
8d1b93772STom Zanussi'used', while Util.pm contains useful but optional utility functions
9d1b93772STom Zanussithat scripts may want to use.  Context.pm contains the Perl->C
10d1b93772STom Zanussiinterface that allows scripts to access data in the embedding perf
11d1b93772STom Zanussiexecutable; scripts wishing to do that should 'use Context.pm'.
12d1b93772STom Zanussi
13d1b93772STom ZanussiThe Perl->C perf interface is completely driven by Context.xs.  If you
14d1b93772STom Zanussiwant to add new Perl functions that end up accessing C data in the
15d1b93772STom Zanussiperf executable, you add desciptions of the new functions here.
16d1b93772STom Zanussiscripting_context is a pointer to the perf data in the perf executable
17d1b93772STom Zanussithat you want to access - it's passed as the second parameter,
18d1b93772STom Zanussi$context, to all handler functions.
19d1b93772STom Zanussi
20d1b93772STom ZanussiAfter you do that:
21d1b93772STom Zanussi
22d1b93772STom Zanussi  perl Makefile.PL   # to create a Makefile for the next step
23d1b93772STom Zanussi  make               # to create Context.c
24d1b93772STom Zanussi
25d1b93772STom Zanussi  edit Context.c to add const to the char* file = __FILE__ line in
26d1b93772STom Zanussi  XS(boot_Perf__Trace__Context) to silence a warning/error.
27d1b93772STom Zanussi
28d1b93772STom Zanussi  You can delete the Makefile, object files and anything else that was
29d1b93772STom Zanussi  generated e.g. blib and shared library, etc, except for of course
30d1b93772STom Zanussi  Context.c
31d1b93772STom Zanussi
32d1b93772STom Zanussi  You should then be able to run the normal perf make as usual.
33d1b93772STom Zanussi
34bcefe12eSTom ZanussiINSTALLATION
35bcefe12eSTom Zanussi
36765532c8SArnaldo Carvalho de MeloBuilding perf with perf script Perl scripting should install this
37bcefe12eSTom Zanussimodule in the right place.
38bcefe12eSTom Zanussi
398ea339adSTom ZanussiYou should make sure libperl and ExtUtils/Embed.pm are installed first
408ea339adSTom Zanussie.g. apt-get install libperl-dev or yum install perl-ExtUtils-Embed.
41bcefe12eSTom Zanussi
42bcefe12eSTom ZanussiDEPENDENCIES
43bcefe12eSTom Zanussi
44bcefe12eSTom ZanussiThis module requires these other modules and libraries:
45bcefe12eSTom Zanussi
46d1b93772STom Zanussi  None
47bcefe12eSTom Zanussi
48bcefe12eSTom ZanussiCOPYRIGHT AND LICENCE
49bcefe12eSTom Zanussi
50bcefe12eSTom ZanussiCopyright (C) 2009 by Tom Zanussi <tzanussi@gmail.com>
51bcefe12eSTom Zanussi
52bcefe12eSTom ZanussiThis library is free software; you can redistribute it and/or modify
53bcefe12eSTom Zanussiit under the same terms as Perl itself, either Perl version 5.10.0 or,
54bcefe12eSTom Zanussiat your option, any later version of Perl 5 you may have available.
55bcefe12eSTom Zanussi
56bcefe12eSTom ZanussiAlternatively, this software may be distributed under the terms of the
57bcefe12eSTom ZanussiGNU General Public License ("GPL") version 2 as published by the Free
58bcefe12eSTom ZanussiSoftware Foundation.
59bcefe12eSTom Zanussi
60