Ignore:
Timestamp:
Oct 22, 2008, 11:59:51 PM (17 years ago)
Author:
bird
Message:

kmk: CONFIG_WITH_MINIMAL_STATS vs. CONFIG_WITH_MAKE_STATS - require special builds for expensive statistics.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/strcache2.c

    r1913 r1915  
    686686  assert (!cache->case_insensitive);
    687687
    688   cache->lookup_count++;
     688  MAKE_STATS (cache->lookup_count++);
    689689
    690690  /* Lookup the entry in the hash table, hoping for an
     
    696696  if (strcache2_is_equal (cache, entry, str, length, hash))
    697697    return (const char *)(entry + 1);
    698   cache->collision_1st_count++;
     698  MAKE_STATS (cache->collision_1st_count++);
    699699
    700700  entry = entry->next;
     
    703703  if (strcache2_is_equal (cache, entry, str, length, hash))
    704704    return (const char *)(entry + 1);
    705   cache->collision_2nd_count++;
     705  MAKE_STATS (cache->collision_2nd_count++);
    706706
    707707  /* Loop the rest.  */
     
    713713      if (strcache2_is_equal (cache, entry, str, length, hash))
    714714        return (const char *)(entry + 1);
    715       cache->collision_3rd_count++;
     715      MAKE_STATS (cache->collision_3rd_count++);
    716716    }
    717717  /* not reached */
     
    734734#endif /* NDEBUG */
    735735
    736   cache->lookup_count++;
     736  MAKE_STATS (cache->lookup_count++);
    737737
    738738  /* Lookup the entry in the hash table, hoping for an
     
    744744  if (strcache2_is_equal (cache, entry, str, length, hash))
    745745    return (const char *)(entry + 1);
    746   cache->collision_1st_count++;
     746  MAKE_STATS (cache->collision_1st_count++);
    747747
    748748  entry = entry->next;
     
    751751  if (strcache2_is_equal (cache, entry, str, length, hash))
    752752    return (const char *)(entry + 1);
    753   cache->collision_2nd_count++;
     753  MAKE_STATS (cache->collision_2nd_count++);
    754754
    755755  /* Loop the rest.  */
     
    761761      if (strcache2_is_equal (cache, entry, str, length, hash))
    762762        return (const char *)(entry + 1);
    763       cache->collision_3rd_count++;
     763      MAKE_STATS (cache->collision_3rd_count++);
    764764    }
    765765  /* not reached */
     
    776776  assert (!cache->case_insensitive);
    777777
    778   cache->lookup_count++;
     778  MAKE_STATS (cache->lookup_count++);
    779779
    780780  /* Lookup the entry in the hash table, hoping for an
     
    786786  if (strcache2_is_equal (cache, entry, str, length, hash))
    787787    return (const char *)(entry + 1);
    788   cache->collision_1st_count++;
     788  MAKE_STATS (cache->collision_1st_count++);
    789789
    790790  entry = entry->next;
     
    793793  if (strcache2_is_equal (cache, entry, str, length, hash))
    794794    return (const char *)(entry + 1);
    795   cache->collision_2nd_count++;
     795  MAKE_STATS (cache->collision_2nd_count++);
    796796
    797797  /* Loop the rest. */
     
    803803      if (strcache2_is_equal (cache, entry, str, length, hash))
    804804        return (const char *)(entry + 1);
    805       cache->collision_3rd_count++;
     805      MAKE_STATS (cache->collision_3rd_count++);
    806806    }
    807807  /* not reached */
     
    820820  assert (!cache->case_insensitive);
    821821
    822   cache->lookup_count++;
     822  MAKE_STATS (cache->lookup_count++);
    823823
    824824  /* Lookup the entry in the hash table, hoping for an
     
    830830  if (strcache2_is_equal (cache, entry, str, length, hash))
    831831    return (const char *)(entry + 1);
    832   cache->collision_1st_count++;
     832  MAKE_STATS (cache->collision_1st_count++);
    833833
    834834  entry = entry->next;
     
    837837  if (strcache2_is_equal (cache, entry, str, length, hash))
    838838    return (const char *)(entry + 1);
    839   cache->collision_2nd_count++;
     839  MAKE_STATS (cache->collision_2nd_count++);
    840840
    841841  /* Loop the rest. */
     
    847847      if (strcache2_is_equal (cache, entry, str, length, hash))
    848848        return (const char *)(entry + 1);
    849       cache->collision_3rd_count++;
     849      MAKE_STATS (cache->collision_3rd_count++);
    850850    }
    851851  /* not reached */
     
    868868#endif /* NDEBUG */
    869869
    870   cache->lookup_count++;
     870  MAKE_STATS (cache->lookup_count++);
    871871
    872872  /* Lookup the entry in the hash table, hoping for an
     
    878878  if (strcache2_is_equal (cache, entry, str, length, hash))
    879879    return (const char *)(entry + 1);
    880   cache->collision_1st_count++;
     880  MAKE_STATS (cache->collision_1st_count++);
    881881
    882882  entry = entry->next;
     
    885885  if (strcache2_is_equal (cache, entry, str, length, hash))
    886886    return (const char *)(entry + 1);
    887   cache->collision_2nd_count++;
     887  MAKE_STATS (cache->collision_2nd_count++);
    888888
    889889  /* Loop the rest. */
     
    895895      if (strcache2_is_equal (cache, entry, str, length, hash))
    896896        return (const char *)(entry + 1);
    897       cache->collision_3rd_count++;
     897      MAKE_STATS (cache->collision_3rd_count++);
    898898    }
    899899  /* not reached */
     
    910910  assert (!cache->case_insensitive);
    911911
    912   cache->lookup_count++;
     912  MAKE_STATS (cache->lookup_count++);
    913913
    914914  /* Lookup the entry in the hash table, hoping for an
     
    920920  if (strcache2_is_equal (cache, entry, str, length, hash))
    921921    return (const char *)(entry + 1);
    922   cache->collision_1st_count++;
     922  MAKE_STATS (cache->collision_1st_count++);
    923923
    924924  entry = entry->next;
     
    927927  if (strcache2_is_equal (cache, entry, str, length, hash))
    928928    return (const char *)(entry + 1);
    929   cache->collision_2nd_count++;
     929  MAKE_STATS (cache->collision_2nd_count++);
    930930
    931931  /* Loop the rest. */
     
    937937      if (strcache2_is_equal (cache, entry, str, length, hash))
    938938        return (const char *)(entry + 1);
    939       cache->collision_3rd_count++;
     939      MAKE_STATS (cache->collision_3rd_count++);
    940940    }
    941941  /* not reached */
Note: See TracChangeset for help on using the changeset viewer.