Context.c 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. /*
  3. * This file was generated automatically by ExtUtils::ParseXS version 2.18_02 from the
  4. * contents of Context.xs. Do not edit this file, edit Context.xs instead.
  5. *
  6. * ANY CHANGES MADE HERE WILL BE LOST!
  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. #include "EXTERN.h"
  19. #include "perl.h"
  20. #include "XSUB.h"
  21. #include "../../../util/trace-event.h"
  22. #ifndef PERL_UNUSED_VAR
  23. # define PERL_UNUSED_VAR(var) if (0) var = var
  24. #endif
  25. #line 42 "Context.c"
  26. XS(XS_Perf__Trace__Context_common_pc); /* prototype to pass -Wmissing-prototypes */
  27. XS(XS_Perf__Trace__Context_common_pc)
  28. {
  29. #ifdef dVAR
  30. dVAR; dXSARGS;
  31. #else
  32. dXSARGS;
  33. #endif
  34. if (items != 1)
  35. Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::common_pc", "context");
  36. PERL_UNUSED_VAR(cv); /* -W */
  37. {
  38. struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0)));
  39. int RETVAL;
  40. dXSTARG;
  41. RETVAL = common_pc(context);
  42. XSprePUSH; PUSHi((IV)RETVAL);
  43. }
  44. XSRETURN(1);
  45. }
  46. XS(XS_Perf__Trace__Context_common_flags); /* prototype to pass -Wmissing-prototypes */
  47. XS(XS_Perf__Trace__Context_common_flags)
  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_flags", "context");
  56. PERL_UNUSED_VAR(cv); /* -W */
  57. {
  58. struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0)));
  59. int RETVAL;
  60. dXSTARG;
  61. RETVAL = common_flags(context);
  62. XSprePUSH; PUSHi((IV)RETVAL);
  63. }
  64. XSRETURN(1);
  65. }
  66. XS(XS_Perf__Trace__Context_common_lock_depth); /* prototype to pass -Wmissing-prototypes */
  67. XS(XS_Perf__Trace__Context_common_lock_depth)
  68. {
  69. #ifdef dVAR
  70. dVAR; dXSARGS;
  71. #else
  72. dXSARGS;
  73. #endif
  74. if (items != 1)
  75. Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::common_lock_depth", "context");
  76. PERL_UNUSED_VAR(cv); /* -W */
  77. {
  78. struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0)));
  79. int RETVAL;
  80. dXSTARG;
  81. RETVAL = common_lock_depth(context);
  82. XSprePUSH; PUSHi((IV)RETVAL);
  83. }
  84. XSRETURN(1);
  85. }
  86. #ifdef __cplusplus
  87. extern "C"
  88. #endif
  89. XS(boot_Perf__Trace__Context); /* prototype to pass -Wmissing-prototypes */
  90. XS(boot_Perf__Trace__Context)
  91. {
  92. #ifdef dVAR
  93. dVAR; dXSARGS;
  94. #else
  95. dXSARGS;
  96. #endif
  97. const char* file = __FILE__;
  98. PERL_UNUSED_VAR(cv); /* -W */
  99. PERL_UNUSED_VAR(items); /* -W */
  100. XS_VERSION_BOOTCHECK ;
  101. newXSproto("Perf::Trace::Context::common_pc", XS_Perf__Trace__Context_common_pc, file, "$");
  102. newXSproto("Perf::Trace::Context::common_flags", XS_Perf__Trace__Context_common_flags, file, "$");
  103. newXSproto("Perf::Trace::Context::common_lock_depth", XS_Perf__Trace__Context_common_lock_depth, file, "$");
  104. if (PL_unitcheckav)
  105. call_list(PL_scopestack_ix, PL_unitcheckav);
  106. XSRETURN_YES;
  107. }