Lines Matching defs: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.
340 pv->stats.num_context[type]++;
341 pv->stats.wasted[type] += plist->bytes_free;
342 pv->stats.overhead[type] += len - plist->bytes_free;
440 pv->stats.stats_size = sizeof(struct profile_stats);
441 pv->stats.major_version = PROFILE_MAJOR_VERSION;
442 pv->stats.minor_version = PROFILE_MINOR_VERSION;
623 memset((void *)&pv->stats, '\0', sizeof(pv->stats));
625 pv->stats.stats_size = sizeof(struct profile_stats);
626 pv->stats.major_version = PROFILE_MAJOR_VERSION;
627 pv->stats.minor_version = PROFILE_MINOR_VERSION;
798 pv->stats.buckets[i] = 0;
801 pv->stats.hash_buckets = 0;
812 pv->stats.buckets[ (nbuckets < MAX_BUCKETS) ? nbuckets : MAX_BUCKETS ]++;
813 if (pv->stats.hash_buckets < nbuckets) {
814 pv->stats.hash_buckets = nbuckets;
821 pv->stats.bogus_count = 0;
836 pv->stats.bogus_count++;
841 pv->stats.bogus_count++;
849 PROF_ULONG_TO_CNT(pv->stats.prof_overflow, 0);
850 PROF_ULONG_TO_CNT(pv->stats.gprof_overflow, 0);
862 PROF_CNT_ADD(pv->stats.gprof_overflow, hptr->overflow);
877 PROF_CNT_ADD(pv->stats.prof_overflow, pptr->overflow);
892 PROF_CNT_ADD(pv->stats.prof_overflow, fptr->prof.overflow);
904 PROF_ULONG_TO_CNT(pv->stats.overflow_ticks, 0);
905 for (i = 0; i < pv->stats.profil_buckets; i++) {
906 PROF_CNT_ADD(pv->stats.overflow_ticks, lptr[i].high);
921 _profile_print_stats(stderr, &_profile_vars.stats, &_profile_vars.profil_info);
930 const struct profile_stats *stats,
944 if (!stats) {
952 sprintf(buf, "%ld.%ld", (long)stats->major_version, (long)stats->minor_version);
957 fprintf(stream, "%12s calls to _{,g}prof_mcount\n", PROF_CNT_TO_DECIMAL((char *)0, stats->cnt));
958 fprintf(stream, "%12s calls to old mcount\n", PROF_CNT_TO_DECIMAL((char *)0, stats->old_mcount));
959 fprintf(stream, "%12s calls to _dummy_mcount\n", PROF_CNT_TO_DECIMAL((char *)0, stats->dummy));
960 fprintf(stream, "%12lu functions profiled\n", (long unsigned)stats->prof_records);
961 fprintf(stream, "%12lu gprof arcs\n", (long unsigned)stats->gprof_records);
964 fprintf(stream, "%12lu profil buckets\n", (long unsigned)stats->profil_buckets);
991 if (stats->max_cpu) {
992 fprintf(stream, "%12lu current cpu/thread\n", (long unsigned)stats->my_cpu);
993 fprintf(stream, "%12lu max cpu/thread+1\n", (long unsigned)stats->max_cpu);
996 if (stats->bogus_count != 0) {
999 (long unsigned)stats->bogus_count);
1002 if (PROF_CNT_NE_0(stats->too_low)) {
1005 PROF_CNT_TO_DECIMAL((char *)0, stats->too_low));
1008 if (PROF_CNT_NE_0(stats->too_high)) {
1011 PROF_CNT_TO_DECIMAL((char *)0, stats->too_high));
1014 if (PROF_CNT_NE_0(stats->acontext_locked)) {
1017 PROF_CNT_TO_DECIMAL((char *)0, stats->acontext_locked));
1020 if (PROF_CNT_NE_0(stats->kernel_ticks)
1021 || PROF_CNT_NE_0(stats->user_ticks)
1022 || PROF_CNT_NE_0(stats->idle_ticks)) {
1027 total_ticks = stats->kernel_ticks;
1028 PROF_CNT_LADD(total_ticks, stats->user_ticks);
1029 PROF_CNT_LADD(total_ticks, stats->idle_ticks);
1038 PROF_CNT_TO_DECIMAL((char *)0, stats->kernel_ticks),
1039 100.0L * (PROF_CNT_TO_LDOUBLE(stats->kernel_ticks) / total_ticks_dbl));
1043 PROF_CNT_TO_DECIMAL((char *)0, stats->user_ticks),
1044 100.0L * (PROF_CNT_TO_LDOUBLE(stats->user_ticks) / total_ticks_dbl));
1048 PROF_CNT_TO_DECIMAL((char *)0, stats->idle_ticks),
1049 100.0L * (PROF_CNT_TO_LDOUBLE(stats->idle_ticks) / total_ticks_dbl));
1052 if (PROF_CNT_NE_0(stats->overflow_ticks)) {
1054 PROF_CNT_TO_DECIMAL((char *)0, stats->overflow_ticks));
1057 if (PROF_CNT_NE_0(stats->hash_num)) {
1061 total_buckets += (long double)stats->buckets[i];
1064 fprintf(stream, "%12lu max bucket(s) on hash chain.\n", (long unsigned)stats->hash_buckets);
1066 if (stats->buckets[i] != 0) {
1068 (long unsigned)stats->buckets[i], i,
1069 100.0L * ((long double)stats->buckets[i] / total_buckets));
1073 if (stats->buckets[MAX_BUCKETS] != 0) {
1075 (long unsigned)stats->buckets[MAX_BUCKETS], MAX_BUCKETS,
1076 100.0L * ((long double)stats->buckets[MAX_BUCKETS] / total_buckets));
1082 PROF_CNT_LADD(total_hits, stats->cache_hits[i]);
1086 long double total = PROF_CNT_TO_LDOUBLE(stats->cnt);
1095 if (PROF_CNT_NE_0(stats->cache_hits[i])) {
1098 PROF_CNT_TO_DECIMAL((char *)0, stats->cache_hits[i]),
1100 100.0L * (PROF_CNT_TO_LDOUBLE(stats->cache_hits[i]) / total_hits_dbl),
1101 100.0L * (PROF_CNT_TO_LDOUBLE(stats->cache_hits[i]) / total));
1105 if (PROF_CNT_NE_0(stats->hash_num)) {
1106 fprintf(stream, "%12s times hash table searched\n", PROF_CNT_TO_DECIMAL((char *)0, stats->hash_num));
1107 fprintf(stream, "%12s hash buckets searched\n", PROF_CNT_TO_DECIMAL((char *)0, stats->hash_search));
1109 PROF_CNT_TO_LDOUBLE(stats->hash_search) / PROF_CNT_TO_LDOUBLE(stats->hash_num));
1113 for (i = 0; i < sizeof (stats->stats_unused) / sizeof (stats->stats_unused[0]); i++) {
1114 if (PROF_CNT_NE_0(stats->stats_unused[i])) {
1116 PROF_CNT_TO_DECIMAL((char *)0, stats->stats_unused[i]),
1118 (unsigned long)stats->stats_unused[i].high,
1119 (unsigned long)stats->stats_unused[i].low);
1127 if (stats->num_context[ac] == 0) {
1135 len = sprintf (buf, "%lu", (long unsigned)stats->num_alloc[ac]);
1139 len = sprintf (buf, "%lu", (long unsigned)stats->wasted[ac]);
1143 len = sprintf (buf, "%lu", (long unsigned)stats->overhead[ac]);
1147 len = sprintf (buf, "%lu", (long unsigned)stats->num_context[ac]);
1154 if (stats->num_context[ac] == 0) {
1160 (long unsigned)stats->bytes_alloc[ac],
1162 width_alloc, (long unsigned)stats->num_alloc[ac],
1163 width_wasted, (long unsigned)stats->wasted[ac],
1164 width_overhead, (long unsigned)stats->overhead[ac],
1165 width_context, (long unsigned)stats->num_context[ac]);
1183 /* If the old_stats has not been initialized, just copy in the new stats */
1187 /* Otherwise, update stats, field by field */