plib->total += site->total;
lib->total += site->total;
static void walk_callsite_tree(callsite *site, int level, int kidnum, FILE *fp){    callsite *parent;    graphnode *meth, *pmeth, *comp, *pcomp, *lib, *plib;    callsite *kid;    int nkids;    parent = site->parent;    meth = comp = lib = NULL;    if (parent) {        meth = site->method;        if (meth) {            pmeth = parent->method;            if (pmeth && pmeth != meth) {                if (!meth->visited)                    meth->total += site->total;                connect_nodes(pmeth, meth, site);                comp = meth->up;                if (comp) {                    pcomp = pmeth->up;                    if (pcomp && pcomp != comp) {                        if (!comp->visited)                            comp->total += site->total;                        connect_nodes(pcomp, comp, site);                        lib = comp->up;                        if (lib) {                            plib = pcomp->up;                            if (plib && plib != lib) {                                if (!lib->visited)                                    plib->total += site->total;                                connect_nodes(plib, lib, site);                            }                            lib->visited = 1;                        }                    }                    comp->visited = 1;                }            }            meth->visited = 1;        }    }    if (do_tree_dump) {        fprintf(fp, "%c%*s%3d %3d %s %lu %lu\n",                site->kids ? '+' : '-', level, "", level, kidnum,                meth ? graphnode_name(meth) : "???",                (unsigned long)site->direct, (unsigned long)site->total);    }    nkids = 0;    for (kid = site->kids; kid; kid = kid->siblings) {        walk_callsite_tree(kid, level + 1, nkids, fp);        nkids++;    }    if (meth) {        meth->visited = 0;        if (comp) {            comp->visited = 0;            if (lib)                lib->visited = 0;        }    }}