162306a36Sopenharmony_ciPerf-Trace-Util version 0.01
262306a36Sopenharmony_ci============================
362306a36Sopenharmony_ci
462306a36Sopenharmony_ciThis module contains utility functions for use with perf script.
562306a36Sopenharmony_ci
662306a36Sopenharmony_ciCore.pm and Util.pm are pure Perl modules; Core.pm contains routines
762306a36Sopenharmony_cithat the core perf support for Perl calls on and should always be
862306a36Sopenharmony_ci'used', while Util.pm contains useful but optional utility functions
962306a36Sopenharmony_cithat scripts may want to use.  Context.pm contains the Perl->C
1062306a36Sopenharmony_ciinterface that allows scripts to access data in the embedding perf
1162306a36Sopenharmony_ciexecutable; scripts wishing to do that should 'use Context.pm'.
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ciThe Perl->C perf interface is completely driven by Context.xs.  If you
1462306a36Sopenharmony_ciwant to add new Perl functions that end up accessing C data in the
1562306a36Sopenharmony_ciperf executable, you add desciptions of the new functions here.
1662306a36Sopenharmony_ciscripting_context is a pointer to the perf data in the perf executable
1762306a36Sopenharmony_cithat you want to access - it's passed as the second parameter,
1862306a36Sopenharmony_ci$context, to all handler functions.
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ciAfter you do that:
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ci  perl Makefile.PL   # to create a Makefile for the next step
2362306a36Sopenharmony_ci  make               # to create Context.c
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci  edit Context.c to add const to the char* file = __FILE__ line in
2662306a36Sopenharmony_ci  XS(boot_Perf__Trace__Context) to silence a warning/error.
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ci  You can delete the Makefile, object files and anything else that was
2962306a36Sopenharmony_ci  generated e.g. blib and shared library, etc, except for of course
3062306a36Sopenharmony_ci  Context.c
3162306a36Sopenharmony_ci
3262306a36Sopenharmony_ci  You should then be able to run the normal perf make as usual.
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ciINSTALLATION
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ciBuilding perf with perf script Perl scripting should install this
3762306a36Sopenharmony_cimodule in the right place.
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ciYou should make sure libperl and ExtUtils/Embed.pm are installed first
4062306a36Sopenharmony_cie.g. apt-get install libperl-dev or yum install perl-ExtUtils-Embed.
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_ciDEPENDENCIES
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_ciThis module requires these other modules and libraries:
4562306a36Sopenharmony_ci
4662306a36Sopenharmony_ci  None
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ciCOPYRIGHT AND LICENCE
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ciCopyright (C) 2009 by Tom Zanussi <tzanussi@gmail.com>
5162306a36Sopenharmony_ci
5262306a36Sopenharmony_ciThis library is free software; you can redistribute it and/or modify
5362306a36Sopenharmony_ciit under the same terms as Perl itself, either Perl version 5.10.0 or,
5462306a36Sopenharmony_ciat your option, any later version of Perl 5 you may have available.
5562306a36Sopenharmony_ci
5662306a36Sopenharmony_ciAlternatively, this software may be distributed under the terms of the
5762306a36Sopenharmony_ciGNU General Public License ("GPL") version 2 as published by the Free
5862306a36Sopenharmony_ciSoftware Foundation.
5962306a36Sopenharmony_ci
60