WithAgent.c

filter: Statementstmt 0.0% 0 / 361 Branchbran 0.0% 0 / 298 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 0.0% 0 / 659 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« Agent.h ↑ Summary
1 /*
2 * This file was generated automatically by ExtUtils::ParseXS version 3.63 from the
3 * contents of WithAgent.xs. Do not edit this file, edit WithAgent.xs instead.
4 *
5 * ANY CHANGES MADE HERE WILL BE LOST!
6 *
7 */
8  
9 #line 1 "WithAgent.xs"
10 #ifdef __cplusplus
11 extern "C" {
12 #include "EXTERN.h"
13 #include "perl.h"
14 #include "XSUB.h"
15 #include "ppport.h"
16 }
17 #endif
18  
19 /* include your class headers here */
20 #include "Agent.h"
21  
22 /* We need one MODULE... line to start the actual XS section of the file.
23 * The XS++ preprocessor will output its own MODULE and PACKAGE lines */
24 #line 25 "WithAgent.c"
25 #ifndef PERL_UNUSED_VAR
26 # define PERL_UNUSED_VAR(var) if (0) var = var
27 #endif
28  
29 #ifndef dVAR
30 # define dVAR dNOOP
31 #endif
32  
33  
34 /* This stuff is not part of the API! You have been warned. */
35 #ifndef PERL_VERSION_DECIMAL
36 # define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s)
37 #endif
38 #ifndef PERL_DECIMAL_VERSION
39 # define PERL_DECIMAL_VERSION \
40 PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION)
41 #endif
42 #ifndef PERL_VERSION_GE
43 # define PERL_VERSION_GE(r,v,s) \
44 (PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s))
45 #endif
46 #ifndef PERL_VERSION_LE
47 # define PERL_VERSION_LE(r,v,s) \
48 (PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s))
49 #endif
50  
51 /* XS_INTERNAL is the explicit static-linkage variant of the default
52 * XS macro.
53 *
54 * XS_EXTERNAL is the same as XS_INTERNAL except it does not include
55 * "static", ie. it exports XSUB symbols. You probably don't want that
56 * for anything but the BOOT XSUB.
57 *
58 * See XSUB.h in core!
59 */
60  
61  
62 /* TODO: This might be compatible further back than 5.10.0. */
63 #if PERL_VERSION_GE(5, 10, 0) && PERL_VERSION_LE(5, 15, 1)
64 # undef XS_EXTERNAL
65 # undef XS_INTERNAL
66 # if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING)
67 # define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name)
68 # define XS_INTERNAL(name) static XSPROTO(name)
69 # endif
70 # if defined(__SYMBIAN32__)
71 # define XS_EXTERNAL(name) EXPORT_C XSPROTO(name)
72 # define XS_INTERNAL(name) EXPORT_C static XSPROTO(name)
73 # endif
74 # ifndef XS_EXTERNAL
75 # if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus)
76 # define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__)
77 # define XS_INTERNAL(name) static void name(pTHX_ CV* cv __attribute__unused__)
78 # else
79 # ifdef __cplusplus
80 # define XS_EXTERNAL(name) extern "C" XSPROTO(name)
81 # define XS_INTERNAL(name) static XSPROTO(name)
82 # else
83 # define XS_EXTERNAL(name) XSPROTO(name)
84 # define XS_INTERNAL(name) static XSPROTO(name)
85 # endif
86 # endif
87 # endif
88 #endif
89  
90 /* perl >= 5.10.0 && perl <= 5.15.1 */
91  
92  
93 /* The XS_EXTERNAL macro is used for functions that must not be static
94 * like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL
95 * macro defined, the best we can do is assume XS is the same.
96 * Dito for XS_INTERNAL.
97 */
98 #ifndef XS_EXTERNAL
99 # define XS_EXTERNAL(name) XS(name)
100 #endif
101 #ifndef XS_INTERNAL
102 # define XS_INTERNAL(name) XS(name)
103 #endif
104  
105 /* Now, finally, after all this mess, we want an ExtUtils::ParseXS
106 * internal macro that we're free to redefine for varying linkage due
107 * to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use
108 * XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to!
109 */
110  
111 #undef XS_EUPXS
112 #if defined(PERL_EUPXS_ALWAYS_EXPORT)
113 # define XS_EUPXS(name) XS_EXTERNAL(name)
114 #else
115 /* default to internal */
116 # define XS_EUPXS(name) XS_INTERNAL(name)
117 #endif
118  
119 #ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE
120 #define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params)
121  
122 /* prototype to pass -Wmissing-prototypes */
123 static void
124 S_croak_xs_usage(const CV *const cv, const char *const params);
125  
126 static void
127 S_croak_xs_usage(const CV *const cv, const char *const params)
128 {
129 const GV *const gv = CvGV(cv);
130  
131 PERL_ARGS_ASSERT_CROAK_XS_USAGE;
132  
133 if (gv) {
134 const char *const gvname = GvNAME(gv);
135 const HV *const stash = GvSTASH(gv);
136 const char *const hvname = stash ? HvNAME(stash) : NULL;
137  
138 if (hvname)
139 Perl_croak_nocontext("Usage: %s::%s(%s)", hvname, gvname, params);
140 else
141 Perl_croak_nocontext("Usage: %s(%s)", gvname, params);
142 } else {
143 /* Pants. I don't think that it should be possible to get here. */
144 Perl_croak_nocontext("Usage: CODE(0x%" UVxf ")(%s)", PTR2UV(cv), params);
145 }
146 }
147 #undef PERL_ARGS_ASSERT_CROAK_XS_USAGE
148  
149 #define croak_xs_usage S_croak_xs_usage
150  
151 #endif
152  
153 /* NOTE: the prototype of newXSproto() is different in versions of perls,
154 * so we define a portable version of newXSproto()
155 */
156 #ifdef newXS_flags
157 #define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0)
158 #else
159 #define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv)
160 #endif /* !defined(newXS_flags) */
161  
162 #if PERL_VERSION_LE(5, 21, 5)
163 # define newXS_deffile(a,b) Perl_newXS(aTHX_ a,b,file)
164 #else
165 # define newXS_deffile(a,b) Perl_newXS_deffile(aTHX_ a,b)
166 #endif
167  
168 /* simple backcompat versions of the TARGx() macros with no optimisation */
169 #ifndef TARGi
170 # define TARGi(iv, do_taint) sv_setiv_mg(TARG, iv)
171 # define TARGu(uv, do_taint) sv_setuv_mg(TARG, uv)
172 # define TARGn(nv, do_taint) sv_setnv_mg(TARG, nv)
173 #endif
174  
175 #line 176 "WithAgent.c"
176  
177 /* INCLUDE_COMMAND: Including output of '/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp' from 'WithAgent.xs' */
178  
179 #include <exception>
180 #undef xsp_constructor_class
181 #define xsp_constructor_class(c) (c)
182 #undef xsp_constructor_class
183 #define xsp_constructor_class(c) (CLASS)
184  
185 XS_EUPXS(XS_NewRelic__Agent__new); /* prototype to pass -Wmissing-prototypes */
186 0 XS_EUPXS(XS_NewRelic__Agent__new)
187 {
188 0 dVAR; dXSARGS;
189 0 ▶ if (items != 5)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 5) 0 0 0
190 0 croak_xs_usage(cv, "CLASS, license_key, app_name, app_language, app_language_version");
191 {
192 0 char * CLASS = (char *)SvPV_nolen(ST(0))
193 ;
194 Agent * RETVAL;
195 0 ▶ const char* license_key = (const char *)SvPV_nolen(ST(1))
Branch: 1 branch
BranchTrueFalseTotal
const char* license_key = (const char *)SvPV_nolen(ST(1)) 0 0 0
196 ;
197 0 ▶ const char* app_name = (const char *)SvPV_nolen(ST(2))
Branch: 1 branch
BranchTrueFalseTotal
const char* app_name = (const char *)SvPV_nolen(ST(2)) 0 0 0
198 ;
199 0 ▶ const char* app_language = (const char *)SvPV_nolen(ST(3))
Branch: 1 branch
BranchTrueFalseTotal
const char* app_language = (const char *)SvPV_nolen(ST(3)) 0 0 0
200 ;
201 0 ▶ const char* app_language_version = (const char *)SvPV_nolen(ST(4))
Branch: 2 branches
BranchTrueFalseTotal
const char* app_language_version = (const char *)SvPV_nolen(ST(4)) 0 0 0
const char* app_language_version = (const char *)SvPV_nolen(ST(4)) 0 0 0
202 ;
203 #line 36 "/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp"
204 try {
205 RETVAL = new Agent( license_key, app_name, app_language, app_language_version );
206 }
207 catch (std::exception& e) {
208 croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
209 }
210 catch (...) {
211 croak("Caught C++ exception of unknown type");
212 }
213 #line 214 "WithAgent.c"
214 {
215 SV * RETVALSV;
216 0 RETVALSV = sv_newmortal();
217 0 sv_setref_pv( RETVALSV, xsp_constructor_class("Agent"), (void*)RETVAL );
218 0 ST(0) = RETVALSV;
219 }
220 }
221 0 XSRETURN(1);
222 }
223  
224 #undef xsp_constructor_class
225 #define xsp_constructor_class(c) (c)
226  
227 XS_EUPXS(XS_NewRelic__Agent_DESTROY); /* prototype to pass -Wmissing-prototypes */
228 0 XS_EUPXS(XS_NewRelic__Agent_DESTROY)
229 {
230 0 dVAR; dXSARGS;
231 0 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 0 0
232 0 croak_xs_usage(cv, "THIS");
233 {
234 Agent * THIS;
235  
236 0 ▶ if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
Branch: 3 branches
BranchTrueFalseTotal
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
237 0 THIS = (Agent *)SvIV((SV*)SvRV( ST(0) ));
238 else{
239 0 warn( "NewRelic::Agent::DESTROY() -- THIS is not a blessed SV reference" );
240 0 XSRETURN_UNDEF;
241 }
242 ;
243 #line 53 "/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp"
244 try {
245 delete THIS;
246 }
247 catch (std::exception& e) {
248 croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
249 }
250 catch (...) {
251 croak("Caught C++ exception of unknown type");
252 }
253 #line 254 "WithAgent.c"
254 }
255 0 XSRETURN_EMPTY;
256 }
257  
258  
259 XS_EUPXS(XS_NewRelic__Agent_embed_collector); /* prototype to pass -Wmissing-prototypes */
260 0 XS_EUPXS(XS_NewRelic__Agent_embed_collector)
261 {
262 0 dVAR; dXSARGS;
263 0 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 0 0
264 0 croak_xs_usage(cv, "THIS");
265 {
266 Agent * THIS;
267  
268 0 ▶ if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
Branch: 3 branches
BranchTrueFalseTotal
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
269 0 THIS = (Agent *)SvIV((SV*)SvRV( ST(0) ));
270 else{
271 0 warn( "NewRelic::Agent::embed_collector() -- THIS is not a blessed SV reference" );
272 0 XSRETURN_UNDEF;
273 }
274 ;
275 #line 66 "/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp"
276 try {
277 THIS->embed_collector();
278 }
279 catch (std::exception& e) {
280 croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
281 }
282 catch (...) {
283 croak("Caught C++ exception of unknown type");
284 }
285 #line 286 "WithAgent.c"
286 }
287 0 XSRETURN_EMPTY;
288 }
289  
290  
291 XS_EUPXS(XS_NewRelic__Agent_init); /* prototype to pass -Wmissing-prototypes */
292 0 XS_EUPXS(XS_NewRelic__Agent_init)
293 {
294 0 dVAR; dXSARGS;
295 0 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 0 0
296 0 croak_xs_usage(cv, "THIS");
297 {
298 Agent * THIS;
299  
300 0 ▶ if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
Branch: 3 branches
BranchTrueFalseTotal
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
301 0 THIS = (Agent *)SvIV((SV*)SvRV( ST(0) ));
302 else{
303 0 warn( "NewRelic::Agent::init() -- THIS is not a blessed SV reference" );
304 0 XSRETURN_UNDEF;
305 }
306 ;
307 #line 79 "/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp"
308 try {
309 THIS->init();
310 }
311 catch (std::exception& e) {
312 croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
313 }
314 catch (...) {
315 croak("Caught C++ exception of unknown type");
316 }
317 #line 318 "WithAgent.c"
318 }
319 0 XSRETURN_EMPTY;
320 }
321  
322  
323 XS_EUPXS(XS_NewRelic__Agent_begin_transaction); /* prototype to pass -Wmissing-prototypes */
324 0 XS_EUPXS(XS_NewRelic__Agent_begin_transaction)
325 {
326 0 dVAR; dXSARGS;
327 0 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 0 0
328 0 croak_xs_usage(cv, "THIS");
329 {
330 Agent * THIS;
331 long RETVAL;
332 0 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 0 0 0
333  
334 0 ▶ if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
Branch: 3 branches
BranchTrueFalseTotal
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
335 0 THIS = (Agent *)SvIV((SV*)SvRV( ST(0) ));
336 else{
337 0 warn( "NewRelic::Agent::begin_transaction() -- THIS is not a blessed SV reference" );
338 0 XSRETURN_UNDEF;
339 }
340 ;
341 #line 92 "/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp"
342 try {
343 RETVAL = THIS->begin_transaction();
344 }
345 catch (std::exception& e) {
346 croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
347 }
348 catch (...) {
349 croak("Caught C++ exception of unknown type");
350 }
351 #line 352 "WithAgent.c"
352 0 ▶ TARGi((IV)RETVAL, 1);
Branch: 1 branch
BranchTrueFalseTotal
TARGi((IV)RETVAL, 1); 0 0 0
353 0 ST(0) = TARG;
354 }
355 0 XSRETURN(1);
356 }
357  
358  
359 XS_EUPXS(XS_NewRelic__Agent_set_transaction_name); /* prototype to pass -Wmissing-prototypes */
360 0 XS_EUPXS(XS_NewRelic__Agent_set_transaction_name)
361 {
362 0 dVAR; dXSARGS;
363 0 ▶ if (items != 3)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 3) 0 0 0
364 0 croak_xs_usage(cv, "THIS, transaction_id, name");
365 {
366 Agent * THIS;
367 int RETVAL;
368 0 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 0 0 0
369 0 long transaction_id = (long)SvIV(ST(1))
370 ;
371 0 const char* name = (const char *)SvPV_nolen(ST(2))
372 ;
373  
374 0 ▶ if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
Branch: 3 branches
BranchTrueFalseTotal
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
375 0 THIS = (Agent *)SvIV((SV*)SvRV( ST(0) ));
376 else{
377 0 warn( "NewRelic::Agent::set_transaction_name() -- THIS is not a blessed SV reference" );
378 0 XSRETURN_UNDEF;
379 }
380 ;
381 #line 106 "/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp"
382 try {
383 RETVAL = THIS->set_transaction_name( transaction_id, name );
384 }
385 catch (std::exception& e) {
386 croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
387 }
388 catch (...) {
389 croak("Caught C++ exception of unknown type");
390 }
391 #line 392 "WithAgent.c"
392 0 ▶ TARGi((IV)RETVAL, 1);
Branch: 1 branch
BranchTrueFalseTotal
TARGi((IV)RETVAL, 1); 0 0 0
393 0 ST(0) = TARG;
394 }
395 0 XSRETURN(1);
396 }
397  
398  
399 XS_EUPXS(XS_NewRelic__Agent_set_transaction_request_url); /* prototype to pass -Wmissing-prototypes */
400 0 XS_EUPXS(XS_NewRelic__Agent_set_transaction_request_url)
401 {
402 0 dVAR; dXSARGS;
403 0 ▶ if (items != 3)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 3) 0 0 0
404 0 croak_xs_usage(cv, "THIS, transaction_id, request_url");
405 {
406 Agent * THIS;
407 int RETVAL;
408 0 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 0 0 0
409 0 long transaction_id = (long)SvIV(ST(1))
410 ;
411 0 const char* request_url = (const char *)SvPV_nolen(ST(2))
412 ;
413  
414 0 ▶ if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
Branch: 3 branches
BranchTrueFalseTotal
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
415 0 THIS = (Agent *)SvIV((SV*)SvRV( ST(0) ));
416 else{
417 0 warn( "NewRelic::Agent::set_transaction_request_url() -- THIS is not a blessed SV reference" );
418 0 XSRETURN_UNDEF;
419 }
420 ;
421 #line 120 "/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp"
422 try {
423 RETVAL = THIS->set_transaction_request_url( transaction_id, request_url );
424 }
425 catch (std::exception& e) {
426 croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
427 }
428 catch (...) {
429 croak("Caught C++ exception of unknown type");
430 }
431 #line 432 "WithAgent.c"
432 0 ▶ TARGi((IV)RETVAL, 1);
Branch: 1 branch
BranchTrueFalseTotal
TARGi((IV)RETVAL, 1); 0 0 0
433 0 ST(0) = TARG;
434 }
435 0 XSRETURN(1);
436 }
437  
438  
439 XS_EUPXS(XS_NewRelic__Agent_set_transaction_max_trace_segments); /* prototype to pass -Wmissing-prototypes */
440 0 XS_EUPXS(XS_NewRelic__Agent_set_transaction_max_trace_segments)
441 {
442 0 dVAR; dXSARGS;
443 0 ▶ if (items != 3)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 3) 0 0 0
444 0 croak_xs_usage(cv, "THIS, transaction_id, max_trace_segments");
445 {
446 Agent * THIS;
447 int RETVAL;
448 0 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 0 0 0
449 0 long transaction_id = (long)SvIV(ST(1))
450 ;
451 0 int max_trace_segments = (int)SvIV(ST(2))
452 ;
453  
454 0 ▶ if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
Branch: 3 branches
BranchTrueFalseTotal
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
455 0 THIS = (Agent *)SvIV((SV*)SvRV( ST(0) ));
456 else{
457 0 warn( "NewRelic::Agent::set_transaction_max_trace_segments() -- THIS is not a blessed SV reference" );
458 0 XSRETURN_UNDEF;
459 }
460 ;
461 #line 134 "/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp"
462 try {
463 RETVAL = THIS->set_transaction_max_trace_segments( transaction_id, max_trace_segments );
464 }
465 catch (std::exception& e) {
466 croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
467 }
468 catch (...) {
469 croak("Caught C++ exception of unknown type");
470 }
471 #line 472 "WithAgent.c"
472 0 ▶ TARGi((IV)RETVAL, 1);
Branch: 1 branch
BranchTrueFalseTotal
TARGi((IV)RETVAL, 1); 0 0 0
473 0 ST(0) = TARG;
474 }
475 0 XSRETURN(1);
476 }
477  
478  
479 XS_EUPXS(XS_NewRelic__Agent_set_transaction_category); /* prototype to pass -Wmissing-prototypes */
480 0 XS_EUPXS(XS_NewRelic__Agent_set_transaction_category)
481 {
482 0 dVAR; dXSARGS;
483 0 ▶ if (items != 3)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 3) 0 0 0
484 0 croak_xs_usage(cv, "THIS, transaction_id, category");
485 {
486 Agent * THIS;
487 int RETVAL;
488 0 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 0 0 0
489 0 long transaction_id = (long)SvIV(ST(1))
490 ;
491 0 const char* category = (const char *)SvPV_nolen(ST(2))
492 ;
493  
494 0 ▶ if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
Branch: 3 branches
BranchTrueFalseTotal
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
495 0 THIS = (Agent *)SvIV((SV*)SvRV( ST(0) ));
496 else{
497 0 warn( "NewRelic::Agent::set_transaction_category() -- THIS is not a blessed SV reference" );
498 0 XSRETURN_UNDEF;
499 }
500 ;
501 #line 148 "/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp"
502 try {
503 RETVAL = THIS->set_transaction_category( transaction_id, category );
504 }
505 catch (std::exception& e) {
506 croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
507 }
508 catch (...) {
509 croak("Caught C++ exception of unknown type");
510 }
511 #line 512 "WithAgent.c"
512 0 ▶ TARGi((IV)RETVAL, 1);
Branch: 1 branch
BranchTrueFalseTotal
TARGi((IV)RETVAL, 1); 0 0 0
513 0 ST(0) = TARG;
514 }
515 0 XSRETURN(1);
516 }
517  
518  
519 XS_EUPXS(XS_NewRelic__Agent_set_transaction_type_web); /* prototype to pass -Wmissing-prototypes */
520 0 XS_EUPXS(XS_NewRelic__Agent_set_transaction_type_web)
521 {
522 0 dVAR; dXSARGS;
523 0 ▶ if (items != 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 2) 0 0 0
524 0 croak_xs_usage(cv, "THIS, transaction_id");
525 {
526 Agent * THIS;
527 int RETVAL;
528 0 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 0 0 0
529 0 long transaction_id = (long)SvIV(ST(1))
530 ;
531  
532 0 ▶ if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
Branch: 3 branches
BranchTrueFalseTotal
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
533 0 THIS = (Agent *)SvIV((SV*)SvRV( ST(0) ));
534 else{
535 0 warn( "NewRelic::Agent::set_transaction_type_web() -- THIS is not a blessed SV reference" );
536 0 XSRETURN_UNDEF;
537 }
538 ;
539 #line 162 "/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp"
540 try {
541 RETVAL = THIS->set_transaction_type_web( transaction_id );
542 }
543 catch (std::exception& e) {
544 croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
545 }
546 catch (...) {
547 croak("Caught C++ exception of unknown type");
548 }
549 #line 550 "WithAgent.c"
550 0 ▶ TARGi((IV)RETVAL, 1);
Branch: 1 branch
BranchTrueFalseTotal
TARGi((IV)RETVAL, 1); 0 0 0
551 0 ST(0) = TARG;
552 }
553 0 XSRETURN(1);
554 }
555  
556  
557 XS_EUPXS(XS_NewRelic__Agent_set_transaction_type_other); /* prototype to pass -Wmissing-prototypes */
558 0 XS_EUPXS(XS_NewRelic__Agent_set_transaction_type_other)
559 {
560 0 dVAR; dXSARGS;
561 0 ▶ if (items != 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 2) 0 0 0
562 0 croak_xs_usage(cv, "THIS, transaction_id");
563 {
564 Agent * THIS;
565 int RETVAL;
566 0 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 0 0 0
567 0 long transaction_id = (long)SvIV(ST(1))
568 ;
569  
570 0 ▶ if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
Branch: 3 branches
BranchTrueFalseTotal
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
571 0 THIS = (Agent *)SvIV((SV*)SvRV( ST(0) ));
572 else{
573 0 warn( "NewRelic::Agent::set_transaction_type_other() -- THIS is not a blessed SV reference" );
574 0 XSRETURN_UNDEF;
575 }
576 ;
577 #line 176 "/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp"
578 try {
579 RETVAL = THIS->set_transaction_type_other( transaction_id );
580 }
581 catch (std::exception& e) {
582 croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
583 }
584 catch (...) {
585 croak("Caught C++ exception of unknown type");
586 }
587 #line 588 "WithAgent.c"
588 0 ▶ TARGi((IV)RETVAL, 1);
Branch: 1 branch
BranchTrueFalseTotal
TARGi((IV)RETVAL, 1); 0 0 0
589 0 ST(0) = TARG;
590 }
591 0 XSRETURN(1);
592 }
593  
594  
595 XS_EUPXS(XS_NewRelic__Agent_add_transaction_attribute); /* prototype to pass -Wmissing-prototypes */
596 0 XS_EUPXS(XS_NewRelic__Agent_add_transaction_attribute)
597 {
598 0 dVAR; dXSARGS;
599 0 ▶ if (items != 4)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 4) 0 0 0
600 0 croak_xs_usage(cv, "THIS, transaction_id, key, value");
601 {
602 Agent * THIS;
603 int RETVAL;
604 0 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 0 0 0
605 0 long transaction_id = (long)SvIV(ST(1))
606 ;
607 0 const char* key = (const char *)SvPV_nolen(ST(2))
608 ;
609 0 ▶ const char* value = (const char *)SvPV_nolen(ST(3))
Branch: 1 branch
BranchTrueFalseTotal
const char* value = (const char *)SvPV_nolen(ST(3)) 0 0 0
610 ;
611  
612 0 ▶ if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
Branch: 3 branches
BranchTrueFalseTotal
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
613 0 THIS = (Agent *)SvIV((SV*)SvRV( ST(0) ));
614 else{
615 0 warn( "NewRelic::Agent::add_transaction_attribute() -- THIS is not a blessed SV reference" );
616 0 XSRETURN_UNDEF;
617 }
618 ;
619 #line 190 "/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp"
620 try {
621 RETVAL = THIS->add_transaction_attribute( transaction_id, key, value );
622 }
623 catch (std::exception& e) {
624 croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
625 }
626 catch (...) {
627 croak("Caught C++ exception of unknown type");
628 }
629 #line 630 "WithAgent.c"
630 0 ▶ TARGi((IV)RETVAL, 1);
Branch: 1 branch
BranchTrueFalseTotal
TARGi((IV)RETVAL, 1); 0 0 0
631 0 ST(0) = TARG;
632 }
633 0 XSRETURN(1);
634 }
635  
636  
637 XS_EUPXS(XS_NewRelic__Agent_notice_transaction_error); /* prototype to pass -Wmissing-prototypes */
638 0 XS_EUPXS(XS_NewRelic__Agent_notice_transaction_error)
639 {
640 0 dVAR; dXSARGS;
641 0 ▶ if (items != 6)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 6) 0 0 0
642 0 croak_xs_usage(cv, "THIS, transaction_id, exception_type, error_message, stack_trace, stack_frame_delimiter");
643 {
644 Agent * THIS;
645 int RETVAL;
646 0 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 0 0 0
647 0 long transaction_id = (long)SvIV(ST(1))
648 ;
649 0 const char* exception_type = (const char *)SvPV_nolen(ST(2))
650 ;
651 0 ▶ const char* error_message = (const char *)SvPV_nolen(ST(3))
Branch: 1 branch
BranchTrueFalseTotal
const char* error_message = (const char *)SvPV_nolen(ST(3)) 0 0 0
652 ;
653 0 ▶ const char* stack_trace = (const char *)SvPV_nolen(ST(4))
Branch: 1 branch
BranchTrueFalseTotal
const char* stack_trace = (const char *)SvPV_nolen(ST(4)) 0 0 0
654 ;
655 0 ▶ const char* stack_frame_delimiter = (const char *)SvPV_nolen(ST(5))
Branch: 1 branch
BranchTrueFalseTotal
const char* stack_frame_delimiter = (const char *)SvPV_nolen(ST(5)) 0 0 0
656 ;
657  
658 0 ▶ if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
Branch: 3 branches
BranchTrueFalseTotal
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
659 0 THIS = (Agent *)SvIV((SV*)SvRV( ST(0) ));
660 else{
661 0 warn( "NewRelic::Agent::notice_transaction_error() -- THIS is not a blessed SV reference" );
662 0 XSRETURN_UNDEF;
663 }
664 ;
665 #line 204 "/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp"
666 try {
667 RETVAL = THIS->notice_transaction_error( transaction_id, exception_type, error_message, stack_trace, stack_frame_delimiter );
668 }
669 catch (std::exception& e) {
670 croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
671 }
672 catch (...) {
673 croak("Caught C++ exception of unknown type");
674 }
675 #line 676 "WithAgent.c"
676 0 ▶ TARGi((IV)RETVAL, 1);
Branch: 1 branch
BranchTrueFalseTotal
TARGi((IV)RETVAL, 1); 0 0 0
677 0 ST(0) = TARG;
678 }
679 0 XSRETURN(1);
680 }
681  
682  
683 XS_EUPXS(XS_NewRelic__Agent_end_transaction); /* prototype to pass -Wmissing-prototypes */
684 0 XS_EUPXS(XS_NewRelic__Agent_end_transaction)
685 {
686 0 dVAR; dXSARGS;
687 0 ▶ if (items != 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 2) 0 0 0
688 0 croak_xs_usage(cv, "THIS, transaction_id");
689 {
690 Agent * THIS;
691 int RETVAL;
692 0 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 0 0 0
693 0 long transaction_id = (long)SvIV(ST(1))
694 ;
695  
696 0 ▶ if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
Branch: 3 branches
BranchTrueFalseTotal
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
697 0 THIS = (Agent *)SvIV((SV*)SvRV( ST(0) ));
698 else{
699 0 warn( "NewRelic::Agent::end_transaction() -- THIS is not a blessed SV reference" );
700 0 XSRETURN_UNDEF;
701 }
702 ;
703 #line 218 "/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp"
704 try {
705 RETVAL = THIS->end_transaction( transaction_id );
706 }
707 catch (std::exception& e) {
708 croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
709 }
710 catch (...) {
711 croak("Caught C++ exception of unknown type");
712 }
713 #line 714 "WithAgent.c"
714 0 ▶ TARGi((IV)RETVAL, 1);
Branch: 1 branch
BranchTrueFalseTotal
TARGi((IV)RETVAL, 1); 0 0 0
715 0 ST(0) = TARG;
716 }
717 0 XSRETURN(1);
718 }
719  
720  
721 XS_EUPXS(XS_NewRelic__Agent_record_metric); /* prototype to pass -Wmissing-prototypes */
722 0 XS_EUPXS(XS_NewRelic__Agent_record_metric)
723 {
724 0 dVAR; dXSARGS;
725 0 ▶ if (items != 3)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 3) 0 0 0
726 0 croak_xs_usage(cv, "THIS, name, value");
727 {
728 Agent * THIS;
729 int RETVAL;
730 0 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 0 0 0
731 0 const char* name = (const char *)SvPV_nolen(ST(1))
732 ;
733 0 double value = (double)SvNV(ST(2))
734 ;
735  
736 0 ▶ if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
Branch: 3 branches
BranchTrueFalseTotal
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
737 0 THIS = (Agent *)SvIV((SV*)SvRV( ST(0) ));
738 else{
739 0 warn( "NewRelic::Agent::record_metric() -- THIS is not a blessed SV reference" );
740 0 XSRETURN_UNDEF;
741 }
742 ;
743 #line 232 "/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp"
744 try {
745 RETVAL = THIS->record_metric( name, value );
746 }
747 catch (std::exception& e) {
748 croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
749 }
750 catch (...) {
751 croak("Caught C++ exception of unknown type");
752 }
753 #line 754 "WithAgent.c"
754 0 ▶ TARGi((IV)RETVAL, 1);
Branch: 1 branch
BranchTrueFalseTotal
TARGi((IV)RETVAL, 1); 0 0 0
755 0 ST(0) = TARG;
756 }
757 0 XSRETURN(1);
758 }
759  
760  
761 XS_EUPXS(XS_NewRelic__Agent_record_cpu_usage); /* prototype to pass -Wmissing-prototypes */
762 0 XS_EUPXS(XS_NewRelic__Agent_record_cpu_usage)
763 {
764 0 dVAR; dXSARGS;
765 0 ▶ if (items != 3)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 3) 0 0 0
766 0 croak_xs_usage(cv, "THIS, cpu_user_time_seconds, cpu_usage_percent");
767 {
768 Agent * THIS;
769 int RETVAL;
770 0 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 0 0 0
771 0 double cpu_user_time_seconds = (double)SvNV(ST(1))
772 ;
773 0 double cpu_usage_percent = (double)SvNV(ST(2))
774 ;
775  
776 0 ▶ if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
Branch: 3 branches
BranchTrueFalseTotal
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
777 0 THIS = (Agent *)SvIV((SV*)SvRV( ST(0) ));
778 else{
779 0 warn( "NewRelic::Agent::record_cpu_usage() -- THIS is not a blessed SV reference" );
780 0 XSRETURN_UNDEF;
781 }
782 ;
783 #line 246 "/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp"
784 try {
785 RETVAL = THIS->record_cpu_usage( cpu_user_time_seconds, cpu_usage_percent );
786 }
787 catch (std::exception& e) {
788 croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
789 }
790 catch (...) {
791 croak("Caught C++ exception of unknown type");
792 }
793 #line 794 "WithAgent.c"
794 0 ▶ TARGi((IV)RETVAL, 1);
Branch: 1 branch
BranchTrueFalseTotal
TARGi((IV)RETVAL, 1); 0 0 0
795 0 ST(0) = TARG;
796 }
797 0 XSRETURN(1);
798 }
799  
800  
801 XS_EUPXS(XS_NewRelic__Agent_record_memory_usage); /* prototype to pass -Wmissing-prototypes */
802 0 XS_EUPXS(XS_NewRelic__Agent_record_memory_usage)
803 {
804 0 dVAR; dXSARGS;
805 0 ▶ if (items != 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 2) 0 0 0
806 0 croak_xs_usage(cv, "THIS, memory_megabyte");
807 {
808 Agent * THIS;
809 int RETVAL;
810 0 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 0 0 0
811 0 double memory_megabyte = (double)SvNV(ST(1))
812 ;
813  
814 0 ▶ if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
Branch: 3 branches
BranchTrueFalseTotal
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
815 0 THIS = (Agent *)SvIV((SV*)SvRV( ST(0) ));
816 else{
817 0 warn( "NewRelic::Agent::record_memory_usage() -- THIS is not a blessed SV reference" );
818 0 XSRETURN_UNDEF;
819 }
820 ;
821 #line 260 "/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp"
822 try {
823 RETVAL = THIS->record_memory_usage( memory_megabyte );
824 }
825 catch (std::exception& e) {
826 croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
827 }
828 catch (...) {
829 croak("Caught C++ exception of unknown type");
830 }
831 #line 832 "WithAgent.c"
832 0 ▶ TARGi((IV)RETVAL, 1);
Branch: 1 branch
BranchTrueFalseTotal
TARGi((IV)RETVAL, 1); 0 0 0
833 0 ST(0) = TARG;
834 }
835 0 XSRETURN(1);
836 }
837  
838  
839 XS_EUPXS(XS_NewRelic__Agent_begin_generic_segment); /* prototype to pass -Wmissing-prototypes */
840 0 XS_EUPXS(XS_NewRelic__Agent_begin_generic_segment)
841 {
842 0 dVAR; dXSARGS;
843 0 ▶ if (items != 4)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 4) 0 0 0
844 0 croak_xs_usage(cv, "THIS, transaction_id, parent_segment_id, name");
845 {
846 Agent * THIS;
847 long RETVAL;
848 0 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 0 0 0
849 0 long transaction_id = (long)SvIV(ST(1))
850 ;
851 0 long parent_segment_id = (long)SvIV(ST(2))
852 ;
853 0 const char* name = (const char *)SvPV_nolen(ST(3))
854 ;
855  
856 0 ▶ if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
Branch: 3 branches
BranchTrueFalseTotal
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
857 0 THIS = (Agent *)SvIV((SV*)SvRV( ST(0) ));
858 else{
859 0 warn( "NewRelic::Agent::begin_generic_segment() -- THIS is not a blessed SV reference" );
860 0 XSRETURN_UNDEF;
861 }
862 ;
863 #line 274 "/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp"
864 try {
865 RETVAL = THIS->begin_generic_segment( transaction_id, parent_segment_id, name );
866 }
867 catch (std::exception& e) {
868 croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
869 }
870 catch (...) {
871 croak("Caught C++ exception of unknown type");
872 }
873 #line 874 "WithAgent.c"
874 0 ▶ TARGi((IV)RETVAL, 1);
Branch: 1 branch
BranchTrueFalseTotal
TARGi((IV)RETVAL, 1); 0 0 0
875 0 ST(0) = TARG;
876 }
877 0 XSRETURN(1);
878 }
879  
880  
881 XS_EUPXS(XS_NewRelic__Agent_begin_datastore_segment); /* prototype to pass -Wmissing-prototypes */
882 0 XS_EUPXS(XS_NewRelic__Agent_begin_datastore_segment)
883 {
884 0 dVAR; dXSARGS;
885 0 ▶ if (items != 7)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 7) 0 0 0
886 0 croak_xs_usage(cv, "THIS, transaction_id, parent_segment_id, table, operation, sql, sql_trace_rollup_name");
887 {
888 Agent * THIS;
889 long RETVAL;
890 0 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 0 0 0
891 0 long transaction_id = (long)SvIV(ST(1))
892 ;
893 0 long parent_segment_id = (long)SvIV(ST(2))
894 ;
895 0 const char* table = (const char *)SvPV_nolen(ST(3))
896 ;
897 0 ▶ const char* operation = (const char *)SvPV_nolen(ST(4))
Branch: 1 branch
BranchTrueFalseTotal
const char* operation = (const char *)SvPV_nolen(ST(4)) 0 0 0
898 ;
899 0 ▶ const char* sql = (const char *)SvPV_nolen(ST(5))
Branch: 1 branch
BranchTrueFalseTotal
const char* sql = (const char *)SvPV_nolen(ST(5)) 0 0 0
900 ;
901 0 ▶ const char* sql_trace_rollup_name = (const char *)SvPV_nolen(ST(6))
Branch: 1 branch
BranchTrueFalseTotal
const char* sql_trace_rollup_name = (const char *)SvPV_nolen(ST(6)) 0 0 0
902 ;
903  
904 0 ▶ if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
Branch: 3 branches
BranchTrueFalseTotal
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
905 0 THIS = (Agent *)SvIV((SV*)SvRV( ST(0) ));
906 else{
907 0 warn( "NewRelic::Agent::begin_datastore_segment() -- THIS is not a blessed SV reference" );
908 0 XSRETURN_UNDEF;
909 }
910 ;
911 #line 288 "/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp"
912 try {
913 RETVAL = THIS->begin_datastore_segment( transaction_id, parent_segment_id, table, operation, sql, sql_trace_rollup_name );
914 }
915 catch (std::exception& e) {
916 croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
917 }
918 catch (...) {
919 croak("Caught C++ exception of unknown type");
920 }
921 #line 922 "WithAgent.c"
922 0 ▶ TARGi((IV)RETVAL, 1);
Branch: 1 branch
BranchTrueFalseTotal
TARGi((IV)RETVAL, 1); 0 0 0
923 0 ST(0) = TARG;
924 }
925 0 XSRETURN(1);
926 }
927  
928  
929 XS_EUPXS(XS_NewRelic__Agent_begin_external_segment); /* prototype to pass -Wmissing-prototypes */
930 0 XS_EUPXS(XS_NewRelic__Agent_begin_external_segment)
931 {
932 0 dVAR; dXSARGS;
933 0 ▶ if (items != 5)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 5) 0 0 0
934 0 croak_xs_usage(cv, "THIS, transaction_id, parent_segment_id, host, name");
935 {
936 Agent * THIS;
937 long RETVAL;
938 0 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 0 0 0
939 0 long transaction_id = (long)SvIV(ST(1))
940 ;
941 0 long parent_segment_id = (long)SvIV(ST(2))
942 ;
943 0 const char* host = (const char *)SvPV_nolen(ST(3))
944 ;
945 0 ▶ const char* name = (const char *)SvPV_nolen(ST(4))
Branch: 2 branches
BranchTrueFalseTotal
const char* name = (const char *)SvPV_nolen(ST(4)) 0 0 0
const char* name = (const char *)SvPV_nolen(ST(4)) 0 0 0
946 ;
947  
948 0 ▶ if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
Branch: 3 branches
BranchTrueFalseTotal
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
949 0 THIS = (Agent *)SvIV((SV*)SvRV( ST(0) ));
950 else{
951 0 warn( "NewRelic::Agent::begin_external_segment() -- THIS is not a blessed SV reference" );
952 0 XSRETURN_UNDEF;
953 }
954 ;
955 #line 302 "/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp"
956 try {
957 RETVAL = THIS->begin_external_segment( transaction_id, parent_segment_id, host, name );
958 }
959 catch (std::exception& e) {
960 croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
961 }
962 catch (...) {
963 croak("Caught C++ exception of unknown type");
964 }
965 #line 966 "WithAgent.c"
966 0 ▶ TARGi((IV)RETVAL, 1);
Branch: 1 branch
BranchTrueFalseTotal
TARGi((IV)RETVAL, 1); 0 0 0
967 0 ST(0) = TARG;
968 }
969 0 XSRETURN(1);
970 }
971  
972  
973 XS_EUPXS(XS_NewRelic__Agent_end_segment); /* prototype to pass -Wmissing-prototypes */
974 0 XS_EUPXS(XS_NewRelic__Agent_end_segment)
975 {
976 0 dVAR; dXSARGS;
977 0 ▶ if (items != 3)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 3) 0 0 0
978 0 croak_xs_usage(cv, "THIS, transaction_id, segment_id");
979 {
980 Agent * THIS;
981 int RETVAL;
982 0 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 0 0 0
983 0 long transaction_id = (long)SvIV(ST(1))
984 ;
985 0 long segment_id = (long)SvIV(ST(2))
986 ;
987  
988 0 ▶ if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
Branch: 3 branches
BranchTrueFalseTotal
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
989 0 THIS = (Agent *)SvIV((SV*)SvRV( ST(0) ));
990 else{
991 0 warn( "NewRelic::Agent::end_segment() -- THIS is not a blessed SV reference" );
992 0 XSRETURN_UNDEF;
993 }
994 ;
995 #line 316 "/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp"
996 try {
997 RETVAL = THIS->end_segment( transaction_id, segment_id );
998 }
999 catch (std::exception& e) {
1000 croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
1001 }
1002 catch (...) {
1003 croak("Caught C++ exception of unknown type");
1004 }
1005 #line 1006 "WithAgent.c"
1006 0 ▶ TARGi((IV)RETVAL, 1);
Branch: 1 branch
BranchTrueFalseTotal
TARGi((IV)RETVAL, 1); 0 0 0
1007 0 ST(0) = TARG;
1008 }
1009 0 XSRETURN(1);
1010 }
1011  
1012  
1013 XS_EUPXS(XS_NewRelic__Agent_get_license_key); /* prototype to pass -Wmissing-prototypes */
1014 0 XS_EUPXS(XS_NewRelic__Agent_get_license_key)
1015 {
1016 0 dVAR; dXSARGS;
1017 0 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 0 0
1018 0 croak_xs_usage(cv, "THIS");
1019 {
1020 Agent * THIS;
1021 const char * RETVAL;
1022 0 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 0 0 0
1023  
1024 0 ▶ if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
Branch: 3 branches
BranchTrueFalseTotal
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
1025 0 THIS = (Agent *)SvIV((SV*)SvRV( ST(0) ));
1026 else{
1027 0 warn( "NewRelic::Agent::get_license_key() -- THIS is not a blessed SV reference" );
1028 0 XSRETURN_UNDEF;
1029 }
1030 ;
1031 #line 330 "/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp"
1032 try {
1033 RETVAL = THIS->get_license_key();
1034 }
1035 catch (std::exception& e) {
1036 croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
1037 }
1038 catch (...) {
1039 croak("Caught C++ exception of unknown type");
1040 }
1041 #line 1042 "WithAgent.c"
1042 0 sv_setpv((SV*)TARG, RETVAL);
1043 0 ST(0) = TARG;
1044 }
1045 0 XSRETURN(1);
1046 }
1047  
1048  
1049 XS_EUPXS(XS_NewRelic__Agent_get_app_name); /* prototype to pass -Wmissing-prototypes */
1050 0 XS_EUPXS(XS_NewRelic__Agent_get_app_name)
1051 {
1052 0 dVAR; dXSARGS;
1053 0 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 0 0
1054 0 croak_xs_usage(cv, "THIS");
1055 {
1056 Agent * THIS;
1057 const char * RETVAL;
1058 0 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 0 0 0
1059  
1060 0 ▶ if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
Branch: 3 branches
BranchTrueFalseTotal
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
1061 0 THIS = (Agent *)SvIV((SV*)SvRV( ST(0) ));
1062 else{
1063 0 warn( "NewRelic::Agent::get_app_name() -- THIS is not a blessed SV reference" );
1064 0 XSRETURN_UNDEF;
1065 }
1066 ;
1067 #line 344 "/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp"
1068 try {
1069 RETVAL = THIS->get_app_name();
1070 }
1071 catch (std::exception& e) {
1072 croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
1073 }
1074 catch (...) {
1075 croak("Caught C++ exception of unknown type");
1076 }
1077 #line 1078 "WithAgent.c"
1078 0 sv_setpv((SV*)TARG, RETVAL);
1079 0 ST(0) = TARG;
1080 }
1081 0 XSRETURN(1);
1082 }
1083  
1084  
1085 XS_EUPXS(XS_NewRelic__Agent_get_app_language); /* prototype to pass -Wmissing-prototypes */
1086 0 XS_EUPXS(XS_NewRelic__Agent_get_app_language)
1087 {
1088 0 dVAR; dXSARGS;
1089 0 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 0 0
1090 0 croak_xs_usage(cv, "THIS");
1091 {
1092 Agent * THIS;
1093 const char * RETVAL;
1094 0 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 0 0 0
1095  
1096 0 ▶ if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
Branch: 3 branches
BranchTrueFalseTotal
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
1097 0 THIS = (Agent *)SvIV((SV*)SvRV( ST(0) ));
1098 else{
1099 0 warn( "NewRelic::Agent::get_app_language() -- THIS is not a blessed SV reference" );
1100 0 XSRETURN_UNDEF;
1101 }
1102 ;
1103 #line 358 "/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp"
1104 try {
1105 RETVAL = THIS->get_app_language();
1106 }
1107 catch (std::exception& e) {
1108 croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
1109 }
1110 catch (...) {
1111 croak("Caught C++ exception of unknown type");
1112 }
1113 #line 1114 "WithAgent.c"
1114 0 sv_setpv((SV*)TARG, RETVAL);
1115 0 ST(0) = TARG;
1116 }
1117 0 XSRETURN(1);
1118 }
1119  
1120  
1121 XS_EUPXS(XS_NewRelic__Agent_get_app_language_version); /* prototype to pass -Wmissing-prototypes */
1122 0 XS_EUPXS(XS_NewRelic__Agent_get_app_language_version)
1123 {
1124 0 dVAR; dXSARGS;
1125 0 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 0 0
1126 0 croak_xs_usage(cv, "THIS");
1127 {
1128 Agent * THIS;
1129 const char * RETVAL;
1130 0 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 0 0 0
1131  
1132 0 ▶ if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
Branch: 3 branches
BranchTrueFalseTotal
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) ) 0 0 0
1133 0 THIS = (Agent *)SvIV((SV*)SvRV( ST(0) ));
1134 else{
1135 0 warn( "NewRelic::Agent::get_app_language_version() -- THIS is not a blessed SV reference" );
1136 0 XSRETURN_UNDEF;
1137 }
1138 ;
1139 #line 372 "/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp"
1140 try {
1141 RETVAL = THIS->get_app_language_version();
1142 }
1143 catch (std::exception& e) {
1144 croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
1145 }
1146 catch (...) {
1147 croak("Caught C++ exception of unknown type");
1148 }
1149 #line 1150 "WithAgent.c"
1150 0 sv_setpv((SV*)TARG, RETVAL);
1151 0 ST(0) = TARG;
1152 }
1153 0 XSRETURN(1);
1154 }
1155  
1156  
1157 /* INCLUDE: Returning to 'WithAgent.xs' from '/usr/local/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- NewRelic-Agent.xsp' */
1158  
1159 #ifdef __cplusplus
1160 extern "C" {
1161 #endif
1162 XS_EXTERNAL(boot_NewRelic__Agent); /* prototype to pass -Wmissing-prototypes */
1163 0 XS_EXTERNAL(boot_NewRelic__Agent)
1164 {
1165 #if PERL_VERSION_LE(5, 21, 5)
1166 dVAR; dXSARGS;
1167 #else
1168 0 dVAR; dXSBOOTARGSXSAPIVERCHK;
1169 #endif
1170 #if PERL_VERSION_LE(5, 8, 999) /* PERL_VERSION_LT is 5.33+ */
1171 char* file = __FILE__;
1172 #else
1173 0 const char* file = __FILE__;
1174 #endif
1175  
1176 PERL_UNUSED_VAR(file);
1177  
1178 PERL_UNUSED_VAR(cv); /* -W */
1179 PERL_UNUSED_VAR(items); /* -W */
1180 #if PERL_VERSION_LE(5, 21, 5)
1181 XS_VERSION_BOOTCHECK;
1182 # ifdef XS_APIVERSION_BOOTCHECK
1183 XS_APIVERSION_BOOTCHECK;
1184 # endif
1185 #endif
1186  
1187 0 newXS_deffile("NewRelic::Agent::_new", XS_NewRelic__Agent__new);
1188 0 newXS_deffile("NewRelic::Agent::DESTROY", XS_NewRelic__Agent_DESTROY);
1189 0 newXS_deffile("NewRelic::Agent::embed_collector", XS_NewRelic__Agent_embed_collector);
1190 0 newXS_deffile("NewRelic::Agent::init", XS_NewRelic__Agent_init);
1191 0 newXS_deffile("NewRelic::Agent::begin_transaction", XS_NewRelic__Agent_begin_transaction);
1192 0 newXS_deffile("NewRelic::Agent::set_transaction_name", XS_NewRelic__Agent_set_transaction_name);
1193 0 newXS_deffile("NewRelic::Agent::set_transaction_request_url", XS_NewRelic__Agent_set_transaction_request_url);
1194 0 newXS_deffile("NewRelic::Agent::set_transaction_max_trace_segments", XS_NewRelic__Agent_set_transaction_max_trace_segments);
1195 0 newXS_deffile("NewRelic::Agent::set_transaction_category", XS_NewRelic__Agent_set_transaction_category);
1196 0 newXS_deffile("NewRelic::Agent::set_transaction_type_web", XS_NewRelic__Agent_set_transaction_type_web);
1197 0 newXS_deffile("NewRelic::Agent::set_transaction_type_other", XS_NewRelic__Agent_set_transaction_type_other);
1198 0 newXS_deffile("NewRelic::Agent::add_transaction_attribute", XS_NewRelic__Agent_add_transaction_attribute);
1199 0 newXS_deffile("NewRelic::Agent::notice_transaction_error", XS_NewRelic__Agent_notice_transaction_error);
1200 0 newXS_deffile("NewRelic::Agent::end_transaction", XS_NewRelic__Agent_end_transaction);
1201 0 newXS_deffile("NewRelic::Agent::record_metric", XS_NewRelic__Agent_record_metric);
1202 0 newXS_deffile("NewRelic::Agent::record_cpu_usage", XS_NewRelic__Agent_record_cpu_usage);
1203 0 newXS_deffile("NewRelic::Agent::record_memory_usage", XS_NewRelic__Agent_record_memory_usage);
1204 0 newXS_deffile("NewRelic::Agent::begin_generic_segment", XS_NewRelic__Agent_begin_generic_segment);
1205 0 newXS_deffile("NewRelic::Agent::begin_datastore_segment", XS_NewRelic__Agent_begin_datastore_segment);
1206 0 newXS_deffile("NewRelic::Agent::begin_external_segment", XS_NewRelic__Agent_begin_external_segment);
1207 0 newXS_deffile("NewRelic::Agent::end_segment", XS_NewRelic__Agent_end_segment);
1208 0 newXS_deffile("NewRelic::Agent::get_license_key", XS_NewRelic__Agent_get_license_key);
1209 0 newXS_deffile("NewRelic::Agent::get_app_name", XS_NewRelic__Agent_get_app_name);
1210 0 newXS_deffile("NewRelic::Agent::get_app_language", XS_NewRelic__Agent_get_app_language);
1211 0 newXS_deffile("NewRelic::Agent::get_app_language_version", XS_NewRelic__Agent_get_app_language_version);
1212 #if PERL_VERSION_LE(5, 21, 5)
1213 # if PERL_VERSION_GE(5, 9, 0)
1214 if (PL_unitcheckav)
1215 call_list(PL_scopestack_ix, PL_unitcheckav);
1216 # endif
1217 XSRETURN_YES;
1218 #else
1219 0 Perl_xs_boot_epilog(aTHX_ ax);
1220 #endif
1221 0 }
1222  
1223 #ifdef __cplusplus
1224 }
1225 #endif
« Agent.h ↑ Summary