Context.c 3.7 KB

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