Context.c 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. /*
  2. * This file was generated automatically by ExtUtils::ParseXS version 2.18_02 from the
  3. * contents of Context.xs. Do not edit this file, edit Context.xs instead.
  4. *
  5. * ANY CHANGES MADE HERE WILL BE LOST!
  6. *
  7. */
  8. #line 1 "Context.xs"
  9. /*
  10. * Context.xs. XS interfaces for perf trace.
  11. *
  12. * Copyright (C) 2009 Tom Zanussi <tzanussi@gmail.com>
  13. *
  14. * This program is free software; you can redistribute it and/or modify
  15. * it under the terms of the GNU General Public License as published by
  16. * the Free Software Foundation; either version 2 of the License, or
  17. * (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 of
  21. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. * GNU General Public License for more details.
  23. *
  24. * You should have received a copy of the GNU General Public License
  25. * along with this program; if not, write to the Free Software
  26. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  27. *
  28. */
  29. #include "EXTERN.h"
  30. #include "perl.h"
  31. #include "XSUB.h"
  32. #include "../../../perf.h"
  33. #include "../../../util/trace-event.h"
  34. #ifndef PERL_UNUSED_VAR
  35. # define PERL_UNUSED_VAR(var) if (0) var = var
  36. #endif
  37. #line 42 "Context.c"
  38. XS(XS_Perf__Trace__Context_common_pc); /* prototype to pass -Wmissing-prototypes */
  39. XS(XS_Perf__Trace__Context_common_pc)
  40. {
  41. #ifdef dVAR
  42. dVAR; dXSARGS;
  43. #else
  44. dXSARGS;
  45. #endif
  46. if (items != 1)
  47. Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::common_pc", "context");
  48. PERL_UNUSED_VAR(cv); /* -W */
  49. {
  50. struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0)));
  51. int RETVAL;
  52. dXSTARG;
  53. RETVAL = common_pc(context);
  54. XSprePUSH; PUSHi((IV)RETVAL);
  55. }
  56. XSRETURN(1);
  57. }
  58. XS(XS_Perf__Trace__Context_common_flags); /* prototype to pass -Wmissing-prototypes */
  59. XS(XS_Perf__Trace__Context_common_flags)
  60. {
  61. #ifdef dVAR
  62. dVAR; dXSARGS;
  63. #else
  64. dXSARGS;
  65. #endif
  66. if (items != 1)
  67. Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::common_flags", "context");
  68. PERL_UNUSED_VAR(cv); /* -W */
  69. {
  70. struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0)));
  71. int RETVAL;
  72. dXSTARG;
  73. RETVAL = common_flags(context);
  74. XSprePUSH; PUSHi((IV)RETVAL);
  75. }
  76. XSRETURN(1);
  77. }
  78. XS(XS_Perf__Trace__Context_common_lock_depth); /* prototype to pass -Wmissing-prototypes */
  79. XS(XS_Perf__Trace__Context_common_lock_depth)
  80. {
  81. #ifdef dVAR
  82. dVAR; dXSARGS;
  83. #else
  84. dXSARGS;
  85. #endif
  86. if (items != 1)
  87. Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::common_lock_depth", "context");
  88. PERL_UNUSED_VAR(cv); /* -W */
  89. {
  90. struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0)));
  91. int RETVAL;
  92. dXSTARG;
  93. RETVAL = common_lock_depth(context);
  94. XSprePUSH; PUSHi((IV)RETVAL);
  95. }
  96. XSRETURN(1);
  97. }
  98. #ifdef __cplusplus
  99. extern "C"
  100. #endif
  101. XS(boot_Perf__Trace__Context); /* prototype to pass -Wmissing-prototypes */
  102. XS(boot_Perf__Trace__Context)
  103. {
  104. #ifdef dVAR
  105. dVAR; dXSARGS;
  106. #else
  107. dXSARGS;
  108. #endif
  109. const char* file = __FILE__;
  110. PERL_UNUSED_VAR(cv); /* -W */
  111. PERL_UNUSED_VAR(items); /* -W */
  112. XS_VERSION_BOOTCHECK ;
  113. newXSproto("Perf::Trace::Context::common_pc", XS_Perf__Trace__Context_common_pc, file, "$");
  114. newXSproto("Perf::Trace::Context::common_flags", XS_Perf__Trace__Context_common_flags, file, "$");
  115. newXSproto("Perf::Trace::Context::common_lock_depth", XS_Perf__Trace__Context_common_lock_depth, file, "$");
  116. if (PL_unitcheckav)
  117. call_list(PL_scopestack_ix, PL_unitcheckav);
  118. XSRETURN_YES;
  119. }