Context.c 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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 "../../../util/trace-event-perl.h"
  33. #ifndef PERL_UNUSED_VAR
  34. # define PERL_UNUSED_VAR(var) if (0) var = var
  35. #endif
  36. #line 41 "Context.c"
  37. XS(XS_Perf__Trace__Context_get_common_pc); /* prototype to pass -Wmissing-prototypes */
  38. XS(XS_Perf__Trace__Context_get_common_pc)
  39. {
  40. #ifdef dVAR
  41. dVAR; dXSARGS;
  42. #else
  43. dXSARGS;
  44. #endif
  45. if (items != 1)
  46. Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::get_common_pc", "context");
  47. PERL_UNUSED_VAR(cv); /* -W */
  48. {
  49. struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0)));
  50. int RETVAL;
  51. dXSTARG;
  52. RETVAL = get_common_pc(context);
  53. XSprePUSH; PUSHi((IV)RETVAL);
  54. }
  55. XSRETURN(1);
  56. }
  57. XS(XS_Perf__Trace__Context_get_common_flags); /* prototype to pass -Wmissing-prototypes */
  58. XS(XS_Perf__Trace__Context_get_common_flags)
  59. {
  60. #ifdef dVAR
  61. dVAR; dXSARGS;
  62. #else
  63. dXSARGS;
  64. #endif
  65. if (items != 1)
  66. Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::get_common_flags", "context");
  67. PERL_UNUSED_VAR(cv); /* -W */
  68. {
  69. struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0)));
  70. int RETVAL;
  71. dXSTARG;
  72. RETVAL = get_common_flags(context);
  73. XSprePUSH; PUSHi((IV)RETVAL);
  74. }
  75. XSRETURN(1);
  76. }
  77. XS(XS_Perf__Trace__Context_get_common_lock_depth); /* prototype to pass -Wmissing-prototypes */
  78. XS(XS_Perf__Trace__Context_get_common_lock_depth)
  79. {
  80. #ifdef dVAR
  81. dVAR; dXSARGS;
  82. #else
  83. dXSARGS;
  84. #endif
  85. if (items != 1)
  86. Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::get_common_lock_depth", "context");
  87. PERL_UNUSED_VAR(cv); /* -W */
  88. {
  89. struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0)));
  90. int RETVAL;
  91. dXSTARG;
  92. RETVAL = get_common_lock_depth(context);
  93. XSprePUSH; PUSHi((IV)RETVAL);
  94. }
  95. XSRETURN(1);
  96. }
  97. #ifdef __cplusplus
  98. extern "C"
  99. #endif
  100. XS(boot_Perf__Trace__Context); /* prototype to pass -Wmissing-prototypes */
  101. XS(boot_Perf__Trace__Context)
  102. {
  103. #ifdef dVAR
  104. dVAR; dXSARGS;
  105. #else
  106. dXSARGS;
  107. #endif
  108. const char* file = __FILE__;
  109. PERL_UNUSED_VAR(cv); /* -W */
  110. PERL_UNUSED_VAR(items); /* -W */
  111. XS_VERSION_BOOTCHECK ;
  112. newXSproto("Perf::Trace::Context::get_common_pc", XS_Perf__Trace__Context_get_common_pc, file, "$");
  113. newXSproto("Perf::Trace::Context::get_common_flags", XS_Perf__Trace__Context_get_common_flags, file, "$");
  114. newXSproto("Perf::Trace::Context::get_common_lock_depth", XS_Perf__Trace__Context_get_common_lock_depth, file, "$");
  115. if (PL_unitcheckav)
  116. call_list(PL_scopestack_ix, PL_unitcheckav);
  117. XSRETURN_YES;
  118. }