Path: blob/master/tools/perf/scripts/perl/Perf-Trace-Util/Context.c
10825 views
/*1* This file was generated automatically by ExtUtils::ParseXS version 2.18_02 from the2* contents of Context.xs. Do not edit this file, edit Context.xs instead.3*4* ANY CHANGES MADE HERE WILL BE LOST!5*6*/78#line 1 "Context.xs"9/*10* Context.xs. XS interfaces for perf script.11*12* Copyright (C) 2009 Tom Zanussi <[email protected]>13*14* This program is free software; you can redistribute it and/or modify15* it under the terms of the GNU General Public License as published by16* the Free Software Foundation; either version 2 of the License, or17* (at your option) any later version.18*19* This program is distributed in the hope that it will be useful,20* but WITHOUT ANY WARRANTY; without even the implied warranty of21* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the22* GNU General Public License for more details.23*24* You should have received a copy of the GNU General Public License25* along with this program; if not, write to the Free Software26* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA27*28*/2930#include "EXTERN.h"31#include "perl.h"32#include "XSUB.h"33#include "../../../perf.h"34#include "../../../util/trace-event.h"3536#ifndef PERL_UNUSED_VAR37# define PERL_UNUSED_VAR(var) if (0) var = var38#endif3940#line 42 "Context.c"4142XS(XS_Perf__Trace__Context_common_pc); /* prototype to pass -Wmissing-prototypes */43XS(XS_Perf__Trace__Context_common_pc)44{45#ifdef dVAR46dVAR; dXSARGS;47#else48dXSARGS;49#endif50if (items != 1)51Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::common_pc", "context");52PERL_UNUSED_VAR(cv); /* -W */53{54struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0)));55int RETVAL;56dXSTARG;5758RETVAL = common_pc(context);59XSprePUSH; PUSHi((IV)RETVAL);60}61XSRETURN(1);62}636465XS(XS_Perf__Trace__Context_common_flags); /* prototype to pass -Wmissing-prototypes */66XS(XS_Perf__Trace__Context_common_flags)67{68#ifdef dVAR69dVAR; dXSARGS;70#else71dXSARGS;72#endif73if (items != 1)74Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::common_flags", "context");75PERL_UNUSED_VAR(cv); /* -W */76{77struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0)));78int RETVAL;79dXSTARG;8081RETVAL = common_flags(context);82XSprePUSH; PUSHi((IV)RETVAL);83}84XSRETURN(1);85}868788XS(XS_Perf__Trace__Context_common_lock_depth); /* prototype to pass -Wmissing-prototypes */89XS(XS_Perf__Trace__Context_common_lock_depth)90{91#ifdef dVAR92dVAR; dXSARGS;93#else94dXSARGS;95#endif96if (items != 1)97Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::common_lock_depth", "context");98PERL_UNUSED_VAR(cv); /* -W */99{100struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0)));101int RETVAL;102dXSTARG;103104RETVAL = common_lock_depth(context);105XSprePUSH; PUSHi((IV)RETVAL);106}107XSRETURN(1);108}109110#ifdef __cplusplus111extern "C"112#endif113XS(boot_Perf__Trace__Context); /* prototype to pass -Wmissing-prototypes */114XS(boot_Perf__Trace__Context)115{116#ifdef dVAR117dVAR; dXSARGS;118#else119dXSARGS;120#endif121const char* file = __FILE__;122123PERL_UNUSED_VAR(cv); /* -W */124PERL_UNUSED_VAR(items); /* -W */125XS_VERSION_BOOTCHECK ;126127newXSproto("Perf::Trace::Context::common_pc", XS_Perf__Trace__Context_common_pc, file, "$");128newXSproto("Perf::Trace::Context::common_flags", XS_Perf__Trace__Context_common_flags, file, "$");129newXSproto("Perf::Trace::Context::common_lock_depth", XS_Perf__Trace__Context_common_lock_depth, file, "$");130if (PL_unitcheckav)131call_list(PL_scopestack_ix, PL_unitcheckav);132XSRETURN_YES;133}134135136137