Lines Matching refs:stats

56  * 	Print out fractional digits for average # of hash searches in stats.
67 * Make most stats 64 bits, except for things like memory allocation.
94 * Print stats as an unsigned number.
101 * Move _gprof_write code that updates hash stats to _profile_update_stats.
113 * Add stats for {user,kernel,idle} mode in the kernel.
116 * Print unused stats in hex as well as decimal.
124 * Combine _profile_{vars,stats,md}; Allow more than one _profile_vars.
131 * Make allocations print like other stats.
140 * Print structure sizes and version number when printing stats.
157 * Write out stats unused fields.
158 * Make _prof_write write out the prof stats gprof collects.
168 * Move max hash bucket calculation into _gprof_write & put info in stats structure.
176 * Cast stats to long for output.
334 pv->stats.num_context[type]++;
335 pv->stats.wasted[type] += plist->bytes_free;
336 pv->stats.overhead[type] += len - plist->bytes_free;
434 pv->stats.stats_size = sizeof(struct profile_stats);
435 pv->stats.major_version = PROFILE_MAJOR_VERSION;
436 pv->stats.minor_version = PROFILE_MINOR_VERSION;
617 memset((void *)&pv->stats, '\0', sizeof(pv->stats));
619 pv->stats.stats_size = sizeof(struct profile_stats);
620 pv->stats.major_version = PROFILE_MAJOR_VERSION;
621 pv->stats.minor_version = PROFILE_MINOR_VERSION;
792 pv->stats.buckets[i] = 0;
795 pv->stats.hash_buckets = 0;
806 pv->stats.buckets[ (nbuckets < MAX_BUCKETS) ? nbuckets : MAX_BUCKETS ]++;
807 if (pv->stats.hash_buckets < nbuckets) {
808 pv->stats.hash_buckets = nbuckets;
815 pv->stats.bogus_count = 0;
830 pv->stats.bogus_count++;
835 pv->stats.bogus_count++;
843 PROF_ULONG_TO_CNT(pv->stats.prof_overflow, 0);
844 PROF_ULONG_TO_CNT(pv->stats.gprof_overflow, 0);
856 PROF_CNT_ADD(pv->stats.gprof_overflow, hptr->overflow);
871 PROF_CNT_ADD(pv->stats.prof_overflow, pptr->overflow);
886 PROF_CNT_ADD(pv->stats.prof_overflow, fptr->prof.overflow);
898 PROF_ULONG_TO_CNT(pv->stats.overflow_ticks, 0);
899 for (i = 0; i < pv->stats.profil_buckets; i++) {
900 PROF_CNT_ADD(pv->stats.overflow_ticks, lptr[i].high);
915 _profile_print_stats(stderr, &_profile_vars.stats, &_profile_vars.profil_info);
924 const struct profile_stats *stats,
938 if (!stats) {
946 sprintf(buf, "%ld.%ld", (long)stats->major_version, (long)stats->minor_version);
951 fprintf(stream, "%12s calls to _{,g}prof_mcount\n", PROF_CNT_TO_DECIMAL((char *)0, stats->cnt));
952 fprintf(stream, "%12s calls to old mcount\n", PROF_CNT_TO_DECIMAL((char *)0, stats->old_mcount));
953 fprintf(stream, "%12s calls to _dummy_mcount\n", PROF_CNT_TO_DECIMAL((char *)0, stats->dummy));
954 fprintf(stream, "%12lu functions profiled\n", (long unsigned)stats->prof_records);
955 fprintf(stream, "%12lu gprof arcs\n", (long unsigned)stats->gprof_records);
958 fprintf(stream, "%12lu profil buckets\n", (long unsigned)stats->profil_buckets);
985 if (stats->max_cpu) {
986 fprintf(stream, "%12lu current cpu/thread\n", (long unsigned)stats->my_cpu);
987 fprintf(stream, "%12lu max cpu/thread+1\n", (long unsigned)stats->max_cpu);
990 if (stats->bogus_count != 0) {
993 (long unsigned)stats->bogus_count);
996 if (PROF_CNT_NE_0(stats->too_low)) {
999 PROF_CNT_TO_DECIMAL((char *)0, stats->too_low));
1002 if (PROF_CNT_NE_0(stats->too_high)) {
1005 PROF_CNT_TO_DECIMAL((char *)0, stats->too_high));
1008 if (PROF_CNT_NE_0(stats->acontext_locked)) {
1011 PROF_CNT_TO_DECIMAL((char *)0, stats->acontext_locked));
1014 if (PROF_CNT_NE_0(stats->kernel_ticks)
1015 || PROF_CNT_NE_0(stats->user_ticks)
1016 || PROF_CNT_NE_0(stats->idle_ticks)) {
1021 total_ticks = stats->kernel_ticks;
1022 PROF_CNT_LADD(total_ticks, stats->user_ticks);
1023 PROF_CNT_LADD(total_ticks, stats->idle_ticks);
1032 PROF_CNT_TO_DECIMAL((char *)0, stats->kernel_ticks),
1033 100.0L * (PROF_CNT_TO_LDOUBLE(stats->kernel_ticks) / total_ticks_dbl));
1037 PROF_CNT_TO_DECIMAL((char *)0, stats->user_ticks),
1038 100.0L * (PROF_CNT_TO_LDOUBLE(stats->user_ticks) / total_ticks_dbl));
1042 PROF_CNT_TO_DECIMAL((char *)0, stats->idle_ticks),
1043 100.0L * (PROF_CNT_TO_LDOUBLE(stats->idle_ticks) / total_ticks_dbl));
1046 if (PROF_CNT_NE_0(stats->overflow_ticks)) {
1048 PROF_CNT_TO_DECIMAL((char *)0, stats->overflow_ticks));
1051 if (PROF_CNT_NE_0(stats->hash_num)) {
1055 total_buckets += (long double)stats->buckets[i];
1058 fprintf(stream, "%12lu max bucket(s) on hash chain.\n", (long unsigned)stats->hash_buckets);
1060 if (stats->buckets[i] != 0) {
1062 (long unsigned)stats->buckets[i], i,
1063 100.0L * ((long double)stats->buckets[i] / total_buckets));
1067 if (stats->buckets[MAX_BUCKETS] != 0) {
1069 (long unsigned)stats->buckets[MAX_BUCKETS], MAX_BUCKETS,
1070 100.0L * ((long double)stats->buckets[MAX_BUCKETS] / total_buckets));
1076 PROF_CNT_LADD(total_hits, stats->cache_hits[i]);
1080 long double total = PROF_CNT_TO_LDOUBLE(stats->cnt);
1089 if (PROF_CNT_NE_0(stats->cache_hits[i])) {
1092 PROF_CNT_TO_DECIMAL((char *)0, stats->cache_hits[i]),
1094 100.0L * (PROF_CNT_TO_LDOUBLE(stats->cache_hits[i]) / total_hits_dbl),
1095 100.0L * (PROF_CNT_TO_LDOUBLE(stats->cache_hits[i]) / total));
1099 if (PROF_CNT_NE_0(stats->hash_num)) {
1100 fprintf(stream, "%12s times hash table searched\n", PROF_CNT_TO_DECIMAL((char *)0, stats->hash_num));
1101 fprintf(stream, "%12s hash buckets searched\n", PROF_CNT_TO_DECIMAL((char *)0, stats->hash_search));
1103 PROF_CNT_TO_LDOUBLE(stats->hash_search) / PROF_CNT_TO_LDOUBLE(stats->hash_num));
1107 for (i = 0; i < sizeof (stats->stats_unused) / sizeof (stats->stats_unused[0]); i++) {
1108 if (PROF_CNT_NE_0(stats->stats_unused[i])) {
1110 PROF_CNT_TO_DECIMAL((char *)0, stats->stats_unused[i]),
1112 (unsigned long)stats->stats_unused[i].high,
1113 (unsigned long)stats->stats_unused[i].low);
1121 if (stats->num_context[ac] == 0) {
1129 len = sprintf (buf, "%lu", (long unsigned)stats->num_alloc[ac]);
1133 len = sprintf (buf, "%lu", (long unsigned)stats->wasted[ac]);
1137 len = sprintf (buf, "%lu", (long unsigned)stats->overhead[ac]);
1141 len = sprintf (buf, "%lu", (long unsigned)stats->num_context[ac]);
1148 if (stats->num_context[ac] == 0) {
1154 (long unsigned)stats->bytes_alloc[ac],
1156 width_alloc, (long unsigned)stats->num_alloc[ac],
1157 width_wasted, (long unsigned)stats->wasted[ac],
1158 width_overhead, (long unsigned)stats->overhead[ac],
1159 width_context, (long unsigned)stats->num_context[ac]);
1177 /* If the old_stats has not been initialized, just copy in the new stats */
1181 /* Otherwise, update stats, field by field */