1
2
3
4
5
6
7
8#include <stdbool.h>
9#ifndef HAS_BOOL
10# define HAS_BOOL 1
11#endif
12#line 1 "Context.xs"
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34#include "EXTERN.h"
35#include "perl.h"
36#include "XSUB.h"
37#include "../../../perf.h"
38#include "../../../util/trace-event.h"
39
40#ifndef PERL_UNUSED_VAR
41# define PERL_UNUSED_VAR(var) if (0) var = var
42#endif
43
44#line 42 "Context.c"
45
46XS(XS_Perf__Trace__Context_common_pc);
47XS(XS_Perf__Trace__Context_common_pc)
48{
49#ifdef dVAR
50 dVAR; dXSARGS;
51#else
52 dXSARGS;
53#endif
54 if (items != 1)
55 Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::common_pc", "context");
56 PERL_UNUSED_VAR(cv);
57 {
58 struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0)));
59 int RETVAL;
60 dXSTARG;
61
62 RETVAL = common_pc(context);
63 XSprePUSH; PUSHi((IV)RETVAL);
64 }
65 XSRETURN(1);
66}
67
68
69XS(XS_Perf__Trace__Context_common_flags);
70XS(XS_Perf__Trace__Context_common_flags)
71{
72#ifdef dVAR
73 dVAR; dXSARGS;
74#else
75 dXSARGS;
76#endif
77 if (items != 1)
78 Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::common_flags", "context");
79 PERL_UNUSED_VAR(cv);
80 {
81 struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0)));
82 int RETVAL;
83 dXSTARG;
84
85 RETVAL = common_flags(context);
86 XSprePUSH; PUSHi((IV)RETVAL);
87 }
88 XSRETURN(1);
89}
90
91
92XS(XS_Perf__Trace__Context_common_lock_depth);
93XS(XS_Perf__Trace__Context_common_lock_depth)
94{
95#ifdef dVAR
96 dVAR; dXSARGS;
97#else
98 dXSARGS;
99#endif
100 if (items != 1)
101 Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::common_lock_depth", "context");
102 PERL_UNUSED_VAR(cv);
103 {
104 struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0)));
105 int RETVAL;
106 dXSTARG;
107
108 RETVAL = common_lock_depth(context);
109 XSprePUSH; PUSHi((IV)RETVAL);
110 }
111 XSRETURN(1);
112}
113
114#ifdef __cplusplus
115extern "C"
116#endif
117XS(boot_Perf__Trace__Context);
118XS(boot_Perf__Trace__Context)
119{
120#ifdef dVAR
121 dVAR; dXSARGS;
122#else
123 dXSARGS;
124#endif
125 const char* file = __FILE__;
126
127 PERL_UNUSED_VAR(cv);
128 PERL_UNUSED_VAR(items);
129 XS_VERSION_BOOTCHECK ;
130
131 newXSproto("Perf::Trace::Context::common_pc", XS_Perf__Trace__Context_common_pc, file, "$");
132 newXSproto("Perf::Trace::Context::common_flags", XS_Perf__Trace__Context_common_flags, file, "$");
133 newXSproto("Perf::Trace::Context::common_lock_depth", XS_Perf__Trace__Context_common_lock_depth, file, "$");
134 if (PL_unitcheckav)
135 call_list(PL_scopestack_ix, PL_unitcheckav);
136 XSRETURN_YES;
137}
138
139