Changeset 1915 for trunk/src/kmk/variable.c
- Timestamp:
- Oct 22, 2008, 11:59:51 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/variable.c
r1914 r1915 33 33 #ifdef KMK 34 34 # include "kbuild.h" 35 #endif 36 #ifdef CONFIG_WITH_STRCACHE2 37 # include <stddef.h> 35 38 #endif 36 39 … … 229 232 } 230 233 else 231 assert (!v || (v->name == name && !HASH_VACANT (v))); 234 { 235 assert (!v || (v->name == name && !HASH_VACANT (v))); 236 var_slot = 0; 237 } 232 238 #endif /* CONFIG_WITH_STRCACHE2 */ 233 239 if (! HASH_VACANT (v)) … … 466 472 hash_1 = strcache2_calc_ptr_hash (&variable_strcache, name); 467 473 ht = &setlist->set->table; 474 MAKE_STATS (ht->ht_lookups++); 468 475 idx = hash_1 & (ht->ht_size - 1); 469 476 v = ht->ht_vec[idx]; … … 481 488 idx &= (ht->ht_size - 1); 482 489 v = (struct variable *) ht->ht_vec[idx]; 483 ht->ht_collisions++; /* there are hardly any deletions, so don't bother with not counting deleted clashes. */490 MAKE_STATS (ht->ht_collisions++); /* there are hardly any deletions, so don't bother with not counting deleted clashes. */ 484 491 485 492 if (v == 0) … … 510 517 /* first iteration unrolled */ 511 518 ht = &setlist->set->table; 519 MAKE_STATS (ht->ht_lookups++); 512 520 idx = hash_1 & (ht->ht_size - 1); 513 521 v = ht->ht_vec[idx]; … … 524 532 idx &= (ht->ht_size - 1); 525 533 v = (struct variable *) ht->ht_vec[idx]; 526 ht->ht_collisions++; /* see reason above */534 MAKE_STATS (ht->ht_collisions++); /* see reason above */ 527 535 528 536 if (v == 0) … … 1158 1166 && defined (CONFIG_WITH_WHICH) \ 1159 1167 && defined (CONFIG_WITH_EVALPLUS) \ 1160 && defined (CONFIG_WITH_MAKE_STATS) \1168 && (defined (CONFIG_WITH_MAKE_STATS) || defined (CONFIG_WITH_MINIMAL_STATS)) \ 1161 1169 && defined (CONFIG_WITH_COMMANDS_FUNC) \ 1162 1170 && defined (KMK_HELPERS) … … 1234 1242 strcat (buf, " evalctx evalval evalvalctx evalcall evalcall2"); 1235 1243 # endif 1236 # if defined (CONFIG_WITH_MAKE_STATS) 1244 # if defined (CONFIG_WITH_MAKE_STATS) || defined (CONFIG_WITH_MINIMAL_STATS) 1237 1245 strcat (buf, " make-stats"); 1238 1246 # endif
Note:
See TracChangeset
for help on using the changeset viewer.