Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182469
b: refs/heads/master
c: 7397d80
h: refs/heads/master
i:
  182467: 3ff00d2
v: v3
  • Loading branch information
Tom Zanussi authored and Frederic Weisbecker committed Feb 23, 2010
1 parent 598867b commit abc36e9
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 40 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e26207a3819684e9b4450a2d30bdd065fa92d9c7
refs/heads/master: 7397d80ddde8eef3b1dce6c29e0c53bd322ef824
5 changes: 3 additions & 2 deletions trunk/tools/perf/scripts/perl/Perf-Trace-Util/Context.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include "../../../util/trace-event-perl.h"
#include "../../../perf.h"
#include "../../../util/trace-event.h"

#ifndef PERL_UNUSED_VAR
# define PERL_UNUSED_VAR(var) if (0) var = var
#endif

#line 41 "Context.c"
#line 42 "Context.c"

XS(XS_Perf__Trace__Context_common_pc); /* prototype to pass -Wmissing-prototypes */
XS(XS_Perf__Trace__Context_common_pc)
Expand Down
3 changes: 2 additions & 1 deletion trunk/tools/perf/scripts/perl/Perf-Trace-Util/Context.xs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include "../../../util/trace-event-perl.h"
#include "../../../perf.h"
#include "../../../util/trace-event.h"

MODULE = Perf::Trace::Context PACKAGE = Perf::Trace::Context
PROTOTYPES: ENABLE
Expand Down
15 changes: 15 additions & 0 deletions trunk/tools/perf/util/trace-event-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -3286,3 +3286,18 @@ void parse_set_info(int nr_cpus, int long_sz)
cpus = nr_cpus;
long_size = long_sz;
}

int common_pc(struct scripting_context *context)
{
return parse_common_pc(context->event_data);
}

int common_flags(struct scripting_context *context)
{
return parse_common_flags(context->event_data);
}

int common_lock_depth(struct scripting_context *context)
{
return parse_common_lock_depth(context->event_data);
}
27 changes: 0 additions & 27 deletions trunk/tools/perf/util/trace-event-perl.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,33 +239,6 @@ static inline struct event *find_cache_event(int type)
return event;
}

int common_pc(struct scripting_context *context)
{
int pc;

pc = parse_common_pc(context->event_data);

return pc;
}

int common_flags(struct scripting_context *context)
{
int flags;

flags = parse_common_flags(context->event_data);

return flags;
}

int common_lock_depth(struct scripting_context *context)
{
int lock_depth;

lock_depth = parse_common_lock_depth(context->event_data);

return lock_depth;
}

static void perl_process_event(int cpu, void *data,
int size __unused,
unsigned long long nsecs, char *comm)
Expand Down
8 changes: 0 additions & 8 deletions trunk/tools/perf/util/trace-event-perl.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,4 @@ void boot_DynaLoader(pTHX_ CV *cv);
typedef PerlInterpreter * INTERP;
#endif

struct scripting_context {
void *event_data;
};

int common_pc(struct scripting_context *context);
int common_flags(struct scripting_context *context);
int common_lock_depth(struct scripting_context *context);

#endif /* __PERF_TRACE_EVENT_PERL_H */
9 changes: 8 additions & 1 deletion trunk/tools/perf/util/trace-event.h
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,14 @@ struct scripting_ops {

int script_spec_register(const char *spec, struct scripting_ops *ops);

extern struct scripting_ops perl_scripting_ops;
void setup_perl_scripting(void);

struct scripting_context {
void *event_data;
};

int common_pc(struct scripting_context *context);
int common_flags(struct scripting_context *context);
int common_lock_depth(struct scripting_context *context);

#endif /* __PERF_TRACE_EVENTS_H */

0 comments on commit abc36e9

Please sign in to comment.