Skip to content

Commit

Permalink
comments on what's definitely wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
timo committed Oct 5, 2014
1 parent cb7647e commit f3e39a6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/profiler/profile.c
Expand Up @@ -124,6 +124,8 @@ static void aggregate_nodes(MVMThreadContext *tc, ProfDumpStrs *pds, MVMProfileC
MVMObject *node_hash;
MVMint64 index;

/* XXX this function currently never touches existing_hash, but it really should. */

for (index = 0; index < existing_elems; index++) {
MVMObject *callee = MVM_repr_at_pos_o(tc, existing_callees, index);
MVMuint64 other_id = MVM_repr_get_int(tc, MVM_repr_at_key_o(tc, callee, pds->id));
Expand Down Expand Up @@ -220,6 +222,7 @@ static void aggregate_nodes(MVMThreadContext *tc, ProfDumpStrs *pds, MVMProfileC
MVMuint64 exclusive_time = pcn->total_time;
for (i = 0; i < pcn->num_succ; i++) {
MVM_repr_bind_key_o(tc, node_hash, pds->is_collection, box_i(tc, 1));
/* XXX In the next call, we should really pass existing_hash instead of node_hash */
aggregate_nodes(tc, pds, pcn->succ[i], node_hash, existing_callees);
exclusive_time -= pcn->succ[i]->total_time;
}
Expand Down

0 comments on commit f3e39a6

Please sign in to comment.