0001
0002
0003
0004
0005
0006
0007
0008 #include <stdbool.h>
0009 #ifndef HAS_BOOL
0010 # define HAS_BOOL 1
0011 #endif
0012 #line 1 "Context.xs"
0013
0014
0015
0016
0017
0018
0019 #include "EXTERN.h"
0020 #include "perl.h"
0021 #include "XSUB.h"
0022 #include "../../../util/trace-event.h"
0023
0024 #ifndef PERL_UNUSED_VAR
0025 # define PERL_UNUSED_VAR(var) if (0) var = var
0026 #endif
0027
0028 #line 42 "Context.c"
0029
0030 XS(XS_Perf__Trace__Context_common_pc);
0031 XS(XS_Perf__Trace__Context_common_pc)
0032 {
0033 #ifdef dVAR
0034 dVAR; dXSARGS;
0035 #else
0036 dXSARGS;
0037 #endif
0038 if (items != 1)
0039 Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::common_pc", "context");
0040 PERL_UNUSED_VAR(cv);
0041 {
0042 struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0)));
0043 int RETVAL;
0044 dXSTARG;
0045
0046 RETVAL = common_pc(context);
0047 XSprePUSH; PUSHi((IV)RETVAL);
0048 }
0049 XSRETURN(1);
0050 }
0051
0052
0053 XS(XS_Perf__Trace__Context_common_flags);
0054 XS(XS_Perf__Trace__Context_common_flags)
0055 {
0056 #ifdef dVAR
0057 dVAR; dXSARGS;
0058 #else
0059 dXSARGS;
0060 #endif
0061 if (items != 1)
0062 Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::common_flags", "context");
0063 PERL_UNUSED_VAR(cv);
0064 {
0065 struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0)));
0066 int RETVAL;
0067 dXSTARG;
0068
0069 RETVAL = common_flags(context);
0070 XSprePUSH; PUSHi((IV)RETVAL);
0071 }
0072 XSRETURN(1);
0073 }
0074
0075
0076 XS(XS_Perf__Trace__Context_common_lock_depth);
0077 XS(XS_Perf__Trace__Context_common_lock_depth)
0078 {
0079 #ifdef dVAR
0080 dVAR; dXSARGS;
0081 #else
0082 dXSARGS;
0083 #endif
0084 if (items != 1)
0085 Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::common_lock_depth", "context");
0086 PERL_UNUSED_VAR(cv);
0087 {
0088 struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0)));
0089 int RETVAL;
0090 dXSTARG;
0091
0092 RETVAL = common_lock_depth(context);
0093 XSprePUSH; PUSHi((IV)RETVAL);
0094 }
0095 XSRETURN(1);
0096 }
0097
0098 #ifdef __cplusplus
0099 extern "C"
0100 #endif
0101 XS(boot_Perf__Trace__Context);
0102 XS(boot_Perf__Trace__Context)
0103 {
0104 #ifdef dVAR
0105 dVAR; dXSARGS;
0106 #else
0107 dXSARGS;
0108 #endif
0109 const char* file = __FILE__;
0110
0111 PERL_UNUSED_VAR(cv);
0112 PERL_UNUSED_VAR(items);
0113 XS_VERSION_BOOTCHECK ;
0114
0115 newXSproto("Perf::Trace::Context::common_pc", XS_Perf__Trace__Context_common_pc, file, "$");
0116 newXSproto("Perf::Trace::Context::common_flags", XS_Perf__Trace__Context_common_flags, file, "$");
0117 newXSproto("Perf::Trace::Context::common_lock_depth", XS_Perf__Trace__Context_common_lock_depth, file, "$");
0118 if (PL_unitcheckav)
0119 call_list(PL_scopestack_ix, PL_unitcheckav);
0120 XSRETURN_YES;
0121 }
0122