Changeset 1915 for trunk/src/kmk/hash.c


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/hash.c

    r1914 r1915  
    137137#endif
    138138
    139   ht->ht_lookups++;
    140 #ifdef CONFIG_WITH_MAKE_STATS
    141   make_stats_ht_lookups++;
    142 #endif
     139  MAKE_STATS (ht->ht_lookups++);
     140  MAKE_STATS_3 (make_stats_ht_lookups++);
    143141  for (;;)
    144142    {
     
    159157          if ((*ht->ht_compare) (key, *slot) == 0)
    160158            return slot;
    161           ht->ht_collisions++;
    162 #ifdef CONFIG_WITH_MAKE_STATS
    163           make_stats_ht_collisions++;
    164 #endif
     159          MAKE_STATS (ht->ht_collisions++);
     160          MAKE_STATS_3 (make_stats_ht_collisions++);
    165161        }
    166162      if (!hash_2)
     
    186182#endif
    187183
    188   ht->ht_lookups++;
    189 #ifdef CONFIG_WITH_MAKE_STATS
    190   make_stats_ht_lookups++;
    191 #endif
     184  MAKE_STATS (ht->ht_lookups++);
     185  MAKE_STATS_3 (make_stats_ht_lookups++);
    192186
    193187  /* first iteration unrolled. */
     
    203197        return slot;
    204198
    205       ht->ht_collisions++;
    206 #ifdef CONFIG_WITH_MAKE_STATS
    207       make_stats_ht_collisions++;
    208 #endif
     199      MAKE_STATS (ht->ht_collisions++);
     200      MAKE_STATS_3 (make_stats_ht_collisions++);
    209201    }
    210202  else
     
    233225            return slot;
    234226
    235           ht->ht_collisions++;
    236 #ifdef CONFIG_WITH_MAKE_STATS
    237           make_stats_ht_collisions++;
    238 #endif
     227          MAKE_STATS (ht->ht_collisions++);
     228          MAKE_STATS_3 (make_stats_ht_collisions++);
    239229        }
    240230
Note: See TracChangeset for help on using the changeset viewer.