This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Some (small) c++ compilation profiling data (oprofile)


On Sun, May 19, 2002 at 10:59:00PM +0100, Neil Booth wrote:
> I think the only user of the hash table in question is cpplib +
> C front-ends, for identifiers (hashtable.{c,h}).

Hum.  We're still starting with

cpphash.c:      table = ht_create (13); /* 8K (=2^13) entries.  */
dwarf2out.c:      debug_str_hash = ht_create (10);
stringpool.c:  ident_hash = ht_create (14);

numbers that look suspiciously small.

I was minded of this because of Mark's Java patch today, which
added another with initial size 37, which does not seem like a
reasonable guess at the number of classes the average Java 
program is going to look up.

Beyond that we have only one example out of 29 that looks reasonable:

./except.c:        = htab_create (cfun->eh->last_region_number * 3 / 2,

The rest should be re-examined for sanity:

./conflict.c:    = htab_create (INITIAL_ARC_CAPACITY, &arc_hash, &arc_eq, NULL);
./cselib.c:  hash_table = htab_create (31, get_value_hash, entry_and_rtx_equal_p, NULL);
./emit-rtl.c:  const_int_htab = htab_create (37, const_int_htab_hash,
./emit-rtl.c:  const_double_htab = htab_create (37, const_double_htab_hash,
./emit-rtl.c:  mem_attrs_htab = htab_create (37, mem_attrs_htab_hash,
./except.c:  type_to_runtime_map = htab_create (31, t2r_hash, t2r_eq, NULL);
./except.c:  ttypes = htab_create (31, ttypes_filter_hash, ttypes_filter_eq, free);
./except.c:  ehspec = htab_create (31, ehspec_filter_hash, ehspec_filter_eq, free);
./except.c:  ar_hash = htab_create (31, action_record_hash, action_record_eq, free);
./except.c:  ar_hash = htab_create (31, action_record_hash, action_record_eq, free);
./fold-const.c:      size_htab = htab_create (1024, size_htab_hash, size_htab_eq, NULL);
./read-rtl.c:    defs = htab_create (32, def_hash, def_name_eq_p, (htab_del) 0);
./ssa.c:  ssa_rename_from_ht = htab_create (64,
./varasm.c:  const_str_htab = htab_create (128, const_str_htab_hash, const_str_htab_eq,
./varasm.c:  in_named_htab = htab_create (31, in_named_entry_hash,
./tree-inline.c:  id.tree_pruner = htab_create (37, htab_hash_pointer,
./tree-inline.c:  htab = htab_create (37, htab_hash_pointer, htab_eq_pointer, NULL);
./tree.c:  type_hash_table = htab_create (TYPE_HASH_INITIAL_SIZE, type_hash_hash,
./config/i386/winnt.c:    htab = htab_create (31, htab_hash_pointer, htab_eq_pointer, NULL);
./config/mips/mips.c:  iris_section_align_htab = htab_create (31, iris_section_align_entry_hash,
./config/rs6000/rs6000.c:  toc_hash_table = htab_create (1021, toc_hash_function, toc_hash_eq, NULL);
./cp/pt.c:      local_specializations = htab_create (37, 
./cp/tree.c:  statements = htab_create (37, htab_hash_pointer, htab_eq_pointer, NULL);
./cp/tree.c:  list_hash_table = htab_create (31, list_hash, list_hash_eq, NULL);
./java/gjavah.c:      throw_hash = htab_create (10, htab_hash_string, gcjh_streq,
./java/gjavah.c:      non_throw_hash = htab_create (10, htab_hash_string, gcjh_streq,
./java/jcf-io.c:    memoized_dirlists = htab_create (37,
./java/jcf-io.c:    memoized_class_lookups = htab_create (37, 

In particular, const_int_htab, const_double_htab, mem_attrs_htab,
and type_to_runtime_map are almost certain to be hit harder than
37 during even a trivial compilation.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]