summaryrefslogtreecommitdiff
path: root/gcc/ggc-zone.c
Commit message (Collapse)AuthorAgeFilesLines
* 2005-07-25 Serge Belyshev <belyshev@depni.sinp.msu.ru>pinskia2005-07-251-2/+2
| | | | | | | | | PR other/22337 * ggc-zone.c (ggc_alloc_zone_stat): Do not use CHUNK_OVERHEAD. (ggc_print_statistics): Initialize variable before use. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102362 138bc75d-0d04-0410-961f-82ee72b054a4
* Update FSF address.kcook2005-06-251-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101317 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c, c-parser.c, cfgbuild.c, cfghooks.c, cfghooks.h,kazu2005-05-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | cfgrtl.c, cgraphunit.c, ddg.c, expr.h, gcse.c, ggc-page.c, ggc-zone.c, gimplify.c, ipa-inline.c, longlong.h, targhooks.c, tree-flow-inline.h, tree-pass.h, tree-ssa-dse.c, tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-operands.c, tree-vect-analyze.c, tree-vect-transform.c, tree-vectorizer.c, tree.c, config/arm/arm.c, config/bfin/bfin.c, config/frv/frv.c, config/frv/frv.md, config/i386/i386.c, config/i386/sse.md, config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h, config/mcore/mcore.c, config/mips/mips.c, config/mips/mips.md, config/rs6000/darwin-ldouble.c, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/sh/sh.c, config/sh/sh.md, config/sh/ushmedia.h, config/sparc/sparc.c, config/sparc/sparc.md, config/stormy16/stormy-abi: Fix comment typos. Follow spelling conventions. * doc/invoke.texi, doc/tm.texi, doc/tree-ssa.texi: Fix typos. Follow spelling conventions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100218 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-page.c (ggc_alloc_stat): Record amount of memory allocated.rakdver2005-05-171-0/+2
| | | | | | | | | | | | | | | | | * ggc-zone.c (ggc_alloc_zone_1): Ditto. * timevar.c (timevar_ggc_mem_total): New variable. (GGC_MEM_BOUND): New constant. (get_time): Record ggc memory status. (timevar_accumulate): Accumulate amount of ggc memory. (timevar_print): Print consumption of ggc memory. * timevar.def (TV_FIND_REFERENCED_VARS, TV_TREE_REDPHI, TV_TREE_LOOP_BOUNDS, TV_TREE_LOOP_IVCANON, TV_TREE_VECTORIZATION, TV_TREE_LINEAR_TRANSFORM): Shorten strings to fit in 22 characters. * timevar.h (struct timevar_time_def): Add ggc_mem field. (timevar_ggc_mem_total): Declare. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99848 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc.h (ggc_alloc_zone_pass_stat): New macro.drow2005-05-021-5/+5
| | | | | | | | | | | | (ggc_alloc_zone_stat): Don't define. * ggc-zone.c (ggc_alloc_typed_stat, ggc_alloc_stat): Use ggc_alloc_zone_pass_stat. * rtl.c (rtx_alloc_stat, shallow_copy_rtx_stat): Likewise. * tree.c (make_node_stat, copy_node_stat, make_tree_binfo_stat) (make_tree_vec_stat, tree_cons_stat, build1_stat): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99114 138bc75d-0d04-0410-961f-82ee72b054a4
* * alloc-pool.c, except.h, ggc-common.c, ggc-zone.c, ggc.h,kazu2005-03-141-1/+1
| | | | | | | stringpool.c, config/mips/mips-protos.h: Update copyright. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96428 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-zone.c: Fix comment typos.kazu2005-03-141-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96427 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-zone.c: Rewritten.drow2005-03-131-647/+1408
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * alloc-pool.c (dump_alloc_pool_statistics): Don't print statistics if there are none. * configure.ac: Define GGC_ZONE for --with-gc=zone. * config.in: Regenerated. * configure: Regenerated. * gentype.c (write_types_process_field, write_func_for_structure): Pass new argument to gt_pch_note_object. * ggc-common.c (struct ptr_data): Add TYPE. (gt_pch_note_object): Take TYPE argument and save it. (call_count): Update call to ggc_pch_count_object. (call_alloc): Update call to ggc_pch_alloc_object. (gt_pch_save): Call ggc_pch_prepare_write after paddng the PCH file. * ggc-none.c (rtl_zone, garbage_zone, ggc_alloc_zone_stat): Delete. * ggc-page.c (rtl_zone, tree_zone, garbage_zone) (ggc_alloc_zone_stat): Delete. (ggc_pch_count_object, ggc_pch_alloc_object): Add TYPE argument. * ggc.h (gt_pch_note_object, ggc_pch_count_object) (ggc_pch_alloc_object): Update prototypes. (garbage_zone): Delete. (tree_zone, rtl_zone, ggc_alloc_zone_stat, ggc_alloc_zone): Move to GGC_ZONE conditional. Update. Change tree_zone and rtl_zone into pointers. (tree_id_zone): New variable. (ggc_alloc_cleared_zone): Remove unused. (ggc_alloc_zone): Define. (ggc_alloc_rtvec, ggc_alloc_tree): Update to use ggc_alloc_zone. * rtl.c (rtx_alloc_stat, shallow_copy_rtx_stat): Use ggc_alloc_zone_stat. * stringpool.c (gt_pch_n_S): Update call to gt_pch_note_object. * tree.c (copy_node_stat, make_tree_binfo_stat, make_tree_vec_stat) (tree_cons_stat, build1_stat): Update call to ggc_alloc_zone_stat. (make_node_stat): Likewise. Use tree_id_zone. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96381 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcse.c (INSN_CUID, insert_set_in_table, find_avail_set,nathan2004-09-091-35/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cprop_insn, do_local_cprop, local_cprop_pass, find_bypass_set, process_insert_insn, insert_insn_end_bb, pre_insert_copy_insn, hoist_code, extract_mentioned_regs_helper, compute_store_table, insert_store): Use gcc_assert and gcc_unreachable. * ggc-common.c (ggc_splay_alloc, ggc_splay_dont_free, gt_pch_note_object, gt_pch_note_reorder, relocate_ptrs, ggc_record_overhead): Likewise. * ggc-page.c (alloc_page, free_page, ggc_set_mark, ggc_marked_p, init_ggc, ggc_push_context, ggc_recalculate_in_use_p, ggc_pop_context, clear_marks, validate_free_objects, ggc_pch_read): Likewise. * ggc-zone.c (ggc_allocated_p, free_chunk, ggc_set_mark, ggc_marked_p, ggc_get_size, init_ggc, destroy_ggc_zone, ggc_push_context, check_cookies, ggc_collect, ggc_print_statistics): Likewise. * gimple-low.c (lower_function_body, lower_stmt, lower_bind_expr): Likewise. * gimplify.c (gimple_tree_eq, push_gimplify_context, pop_gimplify_context, gimple_pop_condition, create_tmp_var, declare_tmp_vars, gimple_add_tmp_var, annotate_all_with_locus, mostly_copy_tree_r, gimplify_return_expr, gimplify_switch_expr, gimplify_case_label_expr, gimplify_exit_block_expr, canonicalize_component_ref, gimplify_compound_lval, gimplify_self_mod_expr, gimplify_call_expr, gimplify_init_ctor_eval, gimplify_init_constructor, gimplify_modify_expr, gimplify_save_expr, gimplify_target_expr, gimplify_expr, check_pointer_types_r, force_gimple_operand): Likewise. * global.c (global_alloc, build_insn_chain): Likewise. * graph.c (clean_graph_dump_file, finish_graph_dump_file): Likewise. gcov-io.c (gcov_open): Use GCOV_CHECK. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87240 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-zone.c (struc alloc_chunk): Rearrange flag bits and SIZE.drow2004-08-241-5/+10
| | | | | | | | Remove TYPECODE. (ggc_alloc_zone_1): Mark TYPE as unused. Don't save it in the chunk. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86456 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-zone.c (struct alloc_zone): Add statistics counters.drow2004-08-091-21/+231
| | | | | | | | | | | | | | | | (always_collect): New flag. (ggc_alloc_zone_1): Update statistics support. Don't include overhead in allocated counter. (sweep_pages): Update allocated counter for large pages. Don'y include overhead. (ggc_collect_1): Always collect. (ggc_collect): Honor always_collect flag. Sum all zones to decide whether to collect. (SCALE, LABEL): New macros. (ggc_print_statistics): Add statistics support. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85729 138bc75d-0d04-0410-961f-82ee72b054a4
* PR bootstrap/12804drow2004-07-261-8/+5
| | | | | | | | | | * ggc-zone.c (struct alloc_chunk): Remove attribute packed. (MAX_FREE_BIN_SIZE): Increase on 64-bit targets. (ggc_free): Remove incorrect freeing. (sweep_pages): Advance PP for large pages. Fix indentation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85194 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-05-04 Paolo Bonzini <bonzini@gnu.org>bonzini2004-05-041-11/+18
| | | | | | | | | | | | | | * ggc-zone.c (ggc_alloc_zone_1): Add MEM_STAT_DECL parameter. Collect overhead information. (ggc_alloc_stat): New name of ggc_alloc. Add MEM_STAT_DECL parameter and pass it through. (ggc_alloc_typed_stat): New name of ggc_alloc_typed. Add MEM_STAT_DECL parameter and pass it through. (ggc_alloc_zone_stat): New name of ggc_alloc_zone. Add MEM_STAT_DECL parameter and pass it through. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81472 138bc75d-0d04-0410-961f-82ee72b054a4
* * bb-reorder.c, c-opts.c, cfglayout.c, cgraph.c, cgraphunit.c,kazu2004-04-301-1/+1
| | | | | | | | | | | | | | | | | cppfiles.c, fold-const.c, ggc-zone.c, loop-doloop.c, optabs.c, reg-stack.c, varasm.c, config/alpha/ev4.md, config/alpha/ev5.md, config/alpha/ev6.md, config/arm/arm.c, config/c4x/c4x.c, config/c4x/c4x.md, config/cris/cris.c, config/cris/cris.h, config/fr30/fr30.h, config/frv/frv.c, config/frv/frv.h, config/frv/frv.md, config/h8300/h8300.c, config/i386/i386.c, config/i386/i386.md, config/i386/winnt.c, config/ia64/itanium2.md, config/ip2k/ip2k.c, config/mips/mips.c, config/mips/mips.h, config/mips/sr71k.md, config/pa/pa.c, config/s390/s390.c, config/sh/sh.c: Fix comment typos. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81345 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-zone.c (ggc_pch_write_object): Don't align file pointer.ian2004-03-041-3/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78882 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-01-30 Daniel Berlin <dberlin@dberlin.org>dberlin2004-01-311-7/+26
| | | | | | | * ggc-zone.c (ggc_free): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77019 138bc75d-0d04-0410-961f-82ee72b054a4
* * alias.c, basic-block.h, c-common.c, c-common.h,kazu2004-01-211-1/+2
| | | | | | | | | | | | | | | | | | | | | c-cppbuiltin.c, c-opts.c, c-pragma.c, c-pretty-print.c, calls.c, cfg.c, cfgcleanup.c, cfgrtl.c, cgraph.h, collect2.c, combine.c, cppcharset.c, cpphash.h, cppinit.c, cpplib.c, cpplib.h, cppmacro.c, crtstuff.c, cselib.c, cselib.h, defaults.h, df.c, dominance.c, et-forest.c, expmed.c, expr.c, expr.h, fix-header.c, function.h, gcc.c, gcse.c, genattrtab.c, genautomata.c, genconditions.c, genemit.c, genflags.c, gengtype.c, gengtype.h, genopinit.c, genrecog.c, gensupport.c, ggc-zone.c, graph.c, haifa-sched.c, input.h, integrate.c, langhooks-def.h, langhooks.c, langhooks.h, line-map.c, line-map.h, local-alloc.c, optabs.c, optabs.h, postreload.c, ra.h, recog.c, reg-stack.c, regmove.c, reload.c, reorg.c, rtl.c, sched-deps.c, sched-ebb.c, sdbout.c, system.h, target.h, targhooks.c, toplev.h, tree-inline.c, unwind-pe.h, unwind.h, varray.c, varray.h: Update copyright. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76302 138bc75d-0d04-0410-961f-82ee72b054a4
* * alias.c: Fix comment typos.kazu2004-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * builtins.c: Likewise. * cfg.c: Likewise. * df.c: Likewise. * dominance.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * fold-const.c: Likewise. * gcse.c: Likewise. * genattrtab.c: Likewise. * genrecog.c: Likewise. * gensupport.c: Likewise. * ggc-zone.c: Likewise. * integrate.c: Likewise. * local-alloc.c: Likewise. * loop.c: Likewise. * recog.c: Likewise. * regmove.c: Likewise. * reg-stack.c: Likewise. * reorg.c: Likewise. * rtlanal.c: Likewise. * rtl.h: Likewise. * sched-ebb.c: Likewise. * simplify-rtx.c: Likewise. * toplev.c: Likewise. * varasm.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75475 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-01-05 Daniel Berlin <dberlin@dberlin.org>dberlin2004-01-051-423/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * ggc-zone.c: Remove everything in #ifdef USING_MALLOC_PAGE_GROUPS (USING_MMAP): We don't support non-mmap. (struct alloc_chunk): Steal 1 bit from typecode, use it to mark large objects. (struct page_entry): Remove bytes_free. (struct page_table_chain): Remove. (struct globals): Remove page_table member. (loookup_page_table_entry): Function deleted. (set_page_table_entry): Ditto. (ggc_allocated_p): No longer need page table lookups. (ggc_marked_p): Ditto. (alloc_small_page): Don't care about bytes_free anymore. (alloc_large_page): Round up size. (ggc_alloc_zone_1): Mark large objects as such, and calculate their size the new way. Remove page table lookups and setting. (ggc_get_size): Calculate large object size the new way. (sweep_pages): Redo to account for fact that we no longer have bytes_free. (ggc_collect): No longer need to reincrement bytes_free. (ggc_pch_alloc_object): Handle new large objects properly. (ggc_pch_read): Put PCH stuff into it's own uncollected zone. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75438 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-typeck.c: Fix comment typos.kazu2003-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * calls.c: Likewise. * cfgcleanup.c: Likewise. * cgraph.h: Likewise. * dwarfout.c: Likewise. * emit-rtl.c: Likewise. * explow.c: Likewise. * expr.c: Likewise. * flow.c: Likewise. * function.c: Likewise. * gcc.c: Likewise. * ggc-zone.c: Likewise. * ifcvt.c: Likewise. * local-alloc.c: Likewise. * predict.c: Likewise. * pretty-print.c: Likewise. * profile.c: Likewise. * ra-colorize.c: Likewise. * sched-vis.c: Likewise. * stor-layout.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74594 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-zone.c (struct alloc_zone): Don't pre-declare, it alreadysteven2003-12-131-21/+45
| | | | | | | | | | | | | comes in with ggc.h. Add a new bool field `dead'. (destroy_ggc_zone): Don't destroy a zone at once. Instead, only set the `dead' flag for the dead zone. Wrap a sanity check in ENABLE_CHECKING. (ggc_collect_1): Always mark and sweep if a zone has the `dead' flag set. (ggc_collect): Free dead zones after collecting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74592 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-zone.c: Follow spelling conventions.kazu2003-12-131-1/+1
| | | | | | | | | | * config/rs6000/rs6000.c: Likewise. * pt.c: Likewise. * semantics.c: Likewise. * objc/objc-act.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74590 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc.h (struct alloc_zone): Move forward declaration up.steven2003-12-011-49/+74
| | | | | | | | | | | | | | | | | | | (new_ggc_zone): New function prototype. (destroy_ggc_zone): Ditto. * ggc-simple.c (new_ggc_zone): New function, does nothing. (destroy_ggc_zone): Ditto. * ggc-page.c (new_ggc_zone): New function, does nothing. (destroy_ggc_zone): Ditto. * ggc-zone.c (struct page_entry): Fix comment. (ggc_alloc_typed): Use a switch statement instead of ifs. (new_ggc_zone): New function to set up a new GC zone. (destroy_ggc_zone): New function to remove a GC zone. init_ggc): Use new_ggc_zone to set up the default zones. (ggc_collect): Walk a list of zones, instead of just the default zones. Report statistics using the zone name. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74132 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-12-01 Daniel Berlin <dberlin@dberlin.org>dberlin2003-12-011-1/+1
| | | | | | | | * ggc-zone.c (ggc_pch_write_object): Calculate object size using ggc_get_size (which accounts for large objects properly). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74114 138bc75d-0d04-0410-961f-82ee72b054a4
* * ChangeLog.7: Fix comment typos.kazu2003-11-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.c: Likewise. * c-pretty-print.c: Likewise. * cgraphunit.c: Likewise. * et-forest.h: Likewise. * expr.c: Likewise. * gcse.c: Likewise. * genautomata.c: Likewise. * genrecog.c: Likewise. * gensupport.c: Likewise. * ggc-zone.c: Likewise. * haifa-sched.c: Likewise. * ifcvt.c: Likewise. * loop.c: Likewise. * optabs.c: Likewise. * pretty-print.h: Likewise. * regrename.c: Likewise. * rtl.h: Likewise. * sched-rgn.c: Likewise. * target.h: Likewise. * value-prof.c: Likewise. * web.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73795 138bc75d-0d04-0410-961f-82ee72b054a4
* * configure.in <enable-checking for valgrind>: Look forhp2003-10-291-1/+7
| | | | | | | | | | | | | | | <valgrind/memcheck.h> first. AC_DEFINE HAVE_VALGRIND_MEMCHECK_H if it exists. * configure, config.in: Regenerate. * ggc-common.c [ENABLE_VALGRIND_CHECKING && HAVE_VALGRIND_MEMCHECK_H]: Include <valgrind/memcheck.h>. Use #elif for other alternatives. * ggc-page.c: Ditto. * ggc-zone.c: Don't assume <valgrind/memcheck.h>; instead copy include structure from ggc-common.c. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73065 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-zone.c (check_cookies): Add missing variable.aj2003-10-281-6/+8
| | | | | | | Add void to prototypes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73000 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-10-26 Daniel Berlin <dberlin@dberlin.org>dberlin2003-10-271-0/+1701
* ggc-zone.c: New file, zone allocating collector. * configure: Accept zone option for --with-gc * configure.in: Ditto. * ggc.h (ggc_pch_count_object): Pass bool indicating stringiness. Update all callers. (ggc_pch_alloc_object): Ditto. (ggc_pch_write_object): Ditto. (ggc_alloc_rtx): Use typed allocation, since all RTX's are of a single type. (ggc_alloc_rtvec): Ditto. (ggc_alloc_tree): Use zone allocation, since some things using this macro aren't a single typecode. * ggc-none.c (ggc_alloc_typed): New function. (ggc_alloc_zone): Ditto. * ggc-page.c: Ditto on both functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72971 138bc75d-0d04-0410-961f-82ee72b054a4