Skip to content

Instantly share code, notes, and snippets.

@davidreynolds
Created July 15, 2011 03:42
Show Gist options
  • Save davidreynolds/1084019 to your computer and use it in GitHub Desktop.
Save davidreynolds/1084019 to your computer and use it in GitHub Desktop.
cg_annotate output for hashtree loading
24,522,286 1 1 16,348,190 0 0 0 0 0 while (i < node_count) {
16,348,188 0 0 8,174,094 0 0 8,174,094 0 0 z = (struct rbt_node_s *)pmap;
24,522,282 0 0 8,174,094 0 0 8,174,094 0 0 pmap += sizeof(struct rbt_node_s);
. . . . . . . . .
24,522,282 0 0 16,348,188 0 0 8,174,094 3,064,773 3,064,773 z->strkey = pmap;
57,218,658 1 1 24,522,282 510,781 510,781 8,174,094 0 0 pmap += z->vlen+1;
. . . . . . . . .
24,522,282 0 0 16,348,188 6,962,690 6,962,690 8,174,094 0 0 poff = *(long *)pmap;
24,522,282 0 0 8,174,094 0 0 8,174,094 0 0 pmap += sizeof(long);
24,522,282 1 1 16,348,188 1,021,156 1,021,156 8,174,094 0 0 loff = *(long *)pmap;
24,522,282 0 0 8,174,094 0 0 8,174,094 0 0 pmap += sizeof(long);
24,522,282 0 0 16,348,188 1,022,298 1,022,298 8,174,094 0 0 roff = *(long *)pmap;
24,522,282 0 0 8,174,094 0 0 8,174,094 0 0 pmap += sizeof(long);
. . . . . . . . .
16,348,188 0 0 8,174,094 0 0 0 0 0 if (poff >= 0)
57,218,651 1 1 24,522,279 0 0 8,174,093 76,990 76,990 z->p = (struct rbt_node_s *)&mapfile[poff];
. . . . . . . . . else {
3 0 0 2 0 0 1 0 0 z->p = NIL;
2 0 0 1 0 0 1 0 0 ht = z;
. . . . . . . . . }
. . . . . . . . .
16,348,188 0 0 8,174,094 0 0 0 0 0 if (loff >= 0)
28,216,202 1 1 12,092,658 0 0 4,030,886 7,488 7,488 z->left = (struct rbt_node_s *)&mapfile[loff];
. . . . . . . . . else
12,429,624 0 0 8,286,416 0 0 4,143,208 8,618 8,618 z->left = NIL;
. . . . . . . . .
16,348,188 0 0 8,174,094 0 0 0 0 0 if (roff >= 0)
29,002,449 0 0 12,429,621 0 0 4,143,207 3,387 3,387 z->right = (struct rbt_node_s *)&mapfile[roff];
. . . . . . . . . else
12,092,661 0 0 8,061,774 0 0 4,030,887 3,617 3,617 z->right = NIL;
. . . . . . . . .
8,174,094 0 0 8,174,094 0 0 0 0 0 ++i;
. . . . . . . . . }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment