Permalink
Browse files

get an accurate count of all ops, not just the ones in the current by…

…tecode segment
  • Loading branch information...
2 parents 77ddb85 + 00aea75 commit 27a4bcbc88a5c09063c5a60ef89823b8d925a1c6 @Whiteknight Whiteknight committed Mar 27, 2011
Showing with 8 additions and 4 deletions.
  1. +1 −1 src/dynpmc/instrumentruncore.pmc
  2. +1 −1 src/runtime/Instrument/Probe.nqp
  3. +2 −1 t/instrument_probe.t
  4. +0 −1 t/instrumentop.t
  5. +4 −0 t/library/IGNORE
@@ -311,7 +311,7 @@ runcore_probes_setup(PARROT_INTERP, PMC *runcore) {
GETATTR_InstrumentRuncore_instrument(interp, runcore, instrument);
GETATTR_Instrument_supervised(interp, instrument, supervised);
- count = supervised->code->op_count;
+ count = Parrot_hash_size(interp, interp->op_hash);
hooks = mem_gc_allocate_n_zeroed_typed(interp, count, probe_list_t *);
catchall = probe_list_create_list(interp);
@@ -89,7 +89,7 @@ everytime a dynlib is loaded.
}
else {
# $op is singular.
- my %oplib := pir::new__PS('OpLib');
+ my %oplib := pir::new__PSP('OpLib', "core_ops");
if pir::does__IPS($op, 'integer') {
# $op = op number.
@@ -89,7 +89,8 @@ PROG
.sub test_core_op
.local pmc probe, probe_class, oplib
- oplib = new ['OpLib']
+ $P0 = box "core_ops"
+ oplib = new ['OpLib'], $P0
probe_class = get_hll_global ['Instrument'], 'Probe'
probe = probe_class.'new'()
View
@@ -63,7 +63,6 @@ PROG
.sub test_one_op
# Test a single opcode.
.local pmc instr, probe, probe_class, args
-
instr = new ['Instrument']
# Set up the program args.
View
@@ -1,2 +1,6 @@
+<<<<<<< HEAD
Ignore this file. It only exists to make sure the t/dynpmc directory is
included in the git repo
+=======
+Ignore this file.
+>>>>>>> 00aea75a6cd0dd51fa979ac8c4240cd92307696a

0 comments on commit 27a4bcb

Please sign in to comment.