All pastes #18440 Raw Edit

Untitled

public text v1 · immutable
#18440 ·published 2005-07-25 11:22 UTC
rendered paste body
johnm static void
johnm cycle_time ()
johnm {
johnm   Sym *member, *cyc;
johnm   for (cyc = &cycle_header[1]; cyc <= &cycle_header[num_cycles]; ++cyc)
johnm     {
johnm       for (member = cyc->cg.cyc.next; member; member = member->cg.cyc.next)
johnm  {
johnm    if (member->cg.prop.fract == 0.0)
johnm      {
johnm        /*
johnm         * All members have the same propfraction except those
johnm         * that were excluded with -E.
johnm         */
johnm        continue;
johnm      }
johnm    cyc->hist.time += member->hist.time;
johnm  }
johnm       cyc->cg.prop.self = cyc->cg.prop.fract * cyc->hist.time;
johnm     }
johnm }


johnm print_cycle (Sym *cyc)
johnm {
johnm   char buf[BUFSIZ];
johnm   sprintf (buf, "[%d]", cyc->cg.index);
johnm   printf (bsd_style_output
johnm    ? "%-6.6s %5.1f %7.2f %11.2f %7lu"
johnm    : "%-6.6s %5.1f %7.2f %7.2f %7lu", buf,
johnm    100 * (cyc->cg.prop.self + cyc->cg.prop.child) / print_time,
johnm    cyc->cg.prop.self / hz, cyc->cg.prop.child / hz, cyc->ncalls);
johnm   if (cyc->cg.self_calls != 0)
johnm     printf ("+%-7lu", cyc->cg.self_calls);
johnm   else
johnm     printf (" %7.7s", "");
johnm   printf (_(" <cycle %d as a whole> [%d]\n"), cyc->cg.cyc.num, cyc->cg.index);
johnm }


There is that hard coded 100 that is a percent that I was telling you about.