Skip to content

Commit

Permalink
get an accurate count of all ops, not just the ones in the current by…
Browse files Browse the repository at this point in the history
…tecode segment
  • Loading branch information
Whiteknight committed Mar 27, 2011
2 parents 77ddb85 + 00aea75 commit 27a4bcb
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/dynpmc/instrumentruncore.pmc
Expand Up @@ -311,7 +311,7 @@ runcore_probes_setup(PARROT_INTERP, PMC *runcore) {
GETATTR_InstrumentRuncore_instrument(interp, runcore, instrument); GETATTR_InstrumentRuncore_instrument(interp, runcore, instrument);
GETATTR_Instrument_supervised(interp, instrument, supervised); 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 *); hooks = mem_gc_allocate_n_zeroed_typed(interp, count, probe_list_t *);
catchall = probe_list_create_list(interp); catchall = probe_list_create_list(interp);


Expand Down
2 changes: 1 addition & 1 deletion src/runtime/Instrument/Probe.nqp
Expand Up @@ -89,7 +89,7 @@ everytime a dynlib is loaded.
} }
else { else {
# $op is singular. # $op is singular.
my %oplib := pir::new__PS('OpLib'); my %oplib := pir::new__PSP('OpLib', "core_ops");


if pir::does__IPS($op, 'integer') { if pir::does__IPS($op, 'integer') {
# $op = op number. # $op = op number.
Expand Down
3 changes: 2 additions & 1 deletion t/instrument_probe.t
Expand Up @@ -89,7 +89,8 @@ PROG


.sub test_core_op .sub test_core_op
.local pmc probe, probe_class, oplib .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_class = get_hll_global ['Instrument'], 'Probe'
probe = probe_class.'new'() probe = probe_class.'new'()
Expand Down
1 change: 0 additions & 1 deletion t/instrumentop.t
Expand Up @@ -63,7 +63,6 @@ PROG
.sub test_one_op .sub test_one_op
# Test a single opcode. # Test a single opcode.
.local pmc instr, probe, probe_class, args .local pmc instr, probe, probe_class, args

instr = new ['Instrument'] instr = new ['Instrument']


# Set up the program args. # Set up the program args.
Expand Down
4 changes: 4 additions & 0 deletions t/library/IGNORE
@@ -1,2 +1,6 @@
<<<<<<< HEAD
Ignore this file. It only exists to make sure the t/dynpmc directory is Ignore this file. It only exists to make sure the t/dynpmc directory is
included in the git repo included in the git repo
=======
Ignore this file.
>>>>>>> 00aea75a6cd0dd51fa979ac8c4240cd92307696a

0 comments on commit 27a4bcb

Please sign in to comment.