Commit 61381de0 authored by Tom Zanussi's avatar Tom Zanussi Committed by Ingo Molnar

perf trace/scripting: Fix Perl common_* access functions

The common_* functions (e.g. common_pc(), etc) are exported as
common_* but named get_common_*, resulting in unresolved
subroutine errors when executing scripts.

Make the internal and external names match.
Signed-off-by: default avatarTom Zanussi <tzanussi@gmail.com>
Cc: fweisbec@gmail.com
Cc: rostedt@goodmis.org
Cc: anton@samba.org
Cc: hch@infradead.org
LKML-Reference: <1259565529-6407-4-git-send-email-tzanussi@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent e136323c
...@@ -39,8 +39,8 @@ ...@@ -39,8 +39,8 @@
#line 41 "Context.c" #line 41 "Context.c"
XS(XS_Perf__Trace__Context_get_common_pc); /* prototype to pass -Wmissing-prototypes */ XS(XS_Perf__Trace__Context_common_pc); /* prototype to pass -Wmissing-prototypes */
XS(XS_Perf__Trace__Context_get_common_pc) XS(XS_Perf__Trace__Context_common_pc)
{ {
#ifdef dVAR #ifdef dVAR
dVAR; dXSARGS; dVAR; dXSARGS;
...@@ -48,22 +48,22 @@ XS(XS_Perf__Trace__Context_get_common_pc) ...@@ -48,22 +48,22 @@ XS(XS_Perf__Trace__Context_get_common_pc)
dXSARGS; dXSARGS;
#endif #endif
if (items != 1) if (items != 1)
Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::get_common_pc", "context"); Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::common_pc", "context");
PERL_UNUSED_VAR(cv); /* -W */ PERL_UNUSED_VAR(cv); /* -W */
{ {
struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0))); struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0)));
int RETVAL; int RETVAL;
dXSTARG; dXSTARG;
RETVAL = get_common_pc(context); RETVAL = common_pc(context);
XSprePUSH; PUSHi((IV)RETVAL); XSprePUSH; PUSHi((IV)RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
XS(XS_Perf__Trace__Context_get_common_flags); /* prototype to pass -Wmissing-prototypes */ XS(XS_Perf__Trace__Context_common_flags); /* prototype to pass -Wmissing-prototypes */
XS(XS_Perf__Trace__Context_get_common_flags) XS(XS_Perf__Trace__Context_common_flags)
{ {
#ifdef dVAR #ifdef dVAR
dVAR; dXSARGS; dVAR; dXSARGS;
...@@ -71,22 +71,22 @@ XS(XS_Perf__Trace__Context_get_common_flags) ...@@ -71,22 +71,22 @@ XS(XS_Perf__Trace__Context_get_common_flags)
dXSARGS; dXSARGS;
#endif #endif
if (items != 1) if (items != 1)
Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::get_common_flags", "context"); Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::common_flags", "context");
PERL_UNUSED_VAR(cv); /* -W */ PERL_UNUSED_VAR(cv); /* -W */
{ {
struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0))); struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0)));
int RETVAL; int RETVAL;
dXSTARG; dXSTARG;
RETVAL = get_common_flags(context); RETVAL = common_flags(context);
XSprePUSH; PUSHi((IV)RETVAL); XSprePUSH; PUSHi((IV)RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
XS(XS_Perf__Trace__Context_get_common_lock_depth); /* prototype to pass -Wmissing-prototypes */ XS(XS_Perf__Trace__Context_common_lock_depth); /* prototype to pass -Wmissing-prototypes */
XS(XS_Perf__Trace__Context_get_common_lock_depth) XS(XS_Perf__Trace__Context_common_lock_depth)
{ {
#ifdef dVAR #ifdef dVAR
dVAR; dXSARGS; dVAR; dXSARGS;
...@@ -94,14 +94,14 @@ XS(XS_Perf__Trace__Context_get_common_lock_depth) ...@@ -94,14 +94,14 @@ XS(XS_Perf__Trace__Context_get_common_lock_depth)
dXSARGS; dXSARGS;
#endif #endif
if (items != 1) if (items != 1)
Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::get_common_lock_depth", "context"); Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::common_lock_depth", "context");
PERL_UNUSED_VAR(cv); /* -W */ PERL_UNUSED_VAR(cv); /* -W */
{ {
struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0))); struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0)));
int RETVAL; int RETVAL;
dXSTARG; dXSTARG;
RETVAL = get_common_lock_depth(context); RETVAL = common_lock_depth(context);
XSprePUSH; PUSHi((IV)RETVAL); XSprePUSH; PUSHi((IV)RETVAL);
} }
XSRETURN(1); XSRETURN(1);
...@@ -124,9 +124,9 @@ XS(boot_Perf__Trace__Context) ...@@ -124,9 +124,9 @@ XS(boot_Perf__Trace__Context)
PERL_UNUSED_VAR(items); /* -W */ PERL_UNUSED_VAR(items); /* -W */
XS_VERSION_BOOTCHECK ; XS_VERSION_BOOTCHECK ;
newXSproto("Perf::Trace::Context::get_common_pc", XS_Perf__Trace__Context_get_common_pc, file, "$"); newXSproto("Perf::Trace::Context::common_pc", XS_Perf__Trace__Context_common_pc, file, "$");
newXSproto("Perf::Trace::Context::get_common_flags", XS_Perf__Trace__Context_get_common_flags, file, "$"); newXSproto("Perf::Trace::Context::common_flags", XS_Perf__Trace__Context_common_flags, file, "$");
newXSproto("Perf::Trace::Context::get_common_lock_depth", XS_Perf__Trace__Context_get_common_lock_depth, file, "$"); newXSproto("Perf::Trace::Context::common_lock_depth", XS_Perf__Trace__Context_common_lock_depth, file, "$");
if (PL_unitcheckav) if (PL_unitcheckav)
call_list(PL_scopestack_ix, PL_unitcheckav); call_list(PL_scopestack_ix, PL_unitcheckav);
XSRETURN_YES; XSRETURN_YES;
......
...@@ -28,14 +28,14 @@ MODULE = Perf::Trace::Context PACKAGE = Perf::Trace::Context ...@@ -28,14 +28,14 @@ MODULE = Perf::Trace::Context PACKAGE = Perf::Trace::Context
PROTOTYPES: ENABLE PROTOTYPES: ENABLE
int int
get_common_pc(context) common_pc(context)
struct scripting_context * context struct scripting_context * context
int int
get_common_flags(context) common_flags(context)
struct scripting_context * context struct scripting_context * context
int int
get_common_lock_depth(context) common_lock_depth(context)
struct scripting_context * context struct scripting_context * context
...@@ -242,7 +242,7 @@ static inline struct event *find_cache_event(int type) ...@@ -242,7 +242,7 @@ static inline struct event *find_cache_event(int type)
return event; return event;
} }
int get_common_pc(struct scripting_context *context) int common_pc(struct scripting_context *context)
{ {
int pc; int pc;
...@@ -251,7 +251,7 @@ int get_common_pc(struct scripting_context *context) ...@@ -251,7 +251,7 @@ int get_common_pc(struct scripting_context *context)
return pc; return pc;
} }
int get_common_flags(struct scripting_context *context) int common_flags(struct scripting_context *context)
{ {
int flags; int flags;
...@@ -260,7 +260,7 @@ int get_common_flags(struct scripting_context *context) ...@@ -260,7 +260,7 @@ int get_common_flags(struct scripting_context *context)
return flags; return flags;
} }
int get_common_lock_depth(struct scripting_context *context) int common_lock_depth(struct scripting_context *context)
{ {
int lock_depth; int lock_depth;
......
...@@ -44,8 +44,8 @@ struct scripting_context { ...@@ -44,8 +44,8 @@ struct scripting_context {
void *event_data; void *event_data;
}; };
int get_common_pc(struct scripting_context *context); int common_pc(struct scripting_context *context);
int get_common_flags(struct scripting_context *context); int common_flags(struct scripting_context *context);
int get_common_lock_depth(struct scripting_context *context); int common_lock_depth(struct scripting_context *context);
#endif /* __PERF_TRACE_EVENT_PERL_H */ #endif /* __PERF_TRACE_EVENT_PERL_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment