OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-dev/] [fsf-gcc-snapshot-1-mar-12/] [or1k-gcc/] [gcc/] [ggc-internal.h] - Diff between revs 684 and 783

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 684 Rev 783
/* Garbage collection for the GNU compiler.  Internal definitions
/* Garbage collection for the GNU compiler.  Internal definitions
   for ggc-*.c and stringpool.c.
   for ggc-*.c and stringpool.c.
 
 
   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
 
 
This file is part of GCC.
This file is part of GCC.
 
 
GCC is free software; you can redistribute it and/or modify it under
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
Software Foundation; either version 3, or (at your option) any later
version.
version.
 
 
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.
for more details.
 
 
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.  */
<http://www.gnu.org/licenses/>.  */
 
 
#ifndef GCC_GGC_INTERNAL_H
#ifndef GCC_GGC_INTERNAL_H
#define GCC_GGC_INTERNAL_H
#define GCC_GGC_INTERNAL_H
 
 
#include "ggc.h"
#include "ggc.h"
 
 
/* Call ggc_set_mark on all the roots.  */
/* Call ggc_set_mark on all the roots.  */
extern void ggc_mark_roots (void);
extern void ggc_mark_roots (void);
 
 
/* Stringpool.  */
/* Stringpool.  */
 
 
/* Mark the entries in the string pool.  */
/* Mark the entries in the string pool.  */
extern void ggc_mark_stringpool (void);
extern void ggc_mark_stringpool (void);
 
 
/* Purge the entries in the string pool.  */
/* Purge the entries in the string pool.  */
extern void ggc_purge_stringpool (void);
extern void ggc_purge_stringpool (void);
 
 
/* Save and restore the string pool entries for PCH.  */
/* Save and restore the string pool entries for PCH.  */
 
 
extern void gt_pch_save_stringpool (void);
extern void gt_pch_save_stringpool (void);
extern void gt_pch_fixup_stringpool (void);
extern void gt_pch_fixup_stringpool (void);
extern void gt_pch_restore_stringpool (void);
extern void gt_pch_restore_stringpool (void);
 
 
/* PCH and GGC handling for strings, mostly trivial.  */
/* PCH and GGC handling for strings, mostly trivial.  */
extern void gt_pch_p_S (void *, void *, gt_pointer_operator, void *);
extern void gt_pch_p_S (void *, void *, gt_pointer_operator, void *);
 
 
/* PCH.  */
/* PCH.  */
 
 
struct ggc_pch_data;
struct ggc_pch_data;
 
 
/* Return a new ggc_pch_data structure.  */
/* Return a new ggc_pch_data structure.  */
extern struct ggc_pch_data *init_ggc_pch (void);
extern struct ggc_pch_data *init_ggc_pch (void);
 
 
/* The second parameter and third parameters give the address and size
/* The second parameter and third parameters give the address and size
   of an object.  Update the ggc_pch_data structure with as much of
   of an object.  Update the ggc_pch_data structure with as much of
   that information as is necessary. The bool argument should be true
   that information as is necessary. The bool argument should be true
   if the object is a string.  */
   if the object is a string.  */
extern void ggc_pch_count_object (struct ggc_pch_data *, void *, size_t, bool,
extern void ggc_pch_count_object (struct ggc_pch_data *, void *, size_t, bool,
                                  enum gt_types_enum);
                                  enum gt_types_enum);
 
 
/* Return the total size of the data to be written to hold all
/* Return the total size of the data to be written to hold all
   the objects previously passed to ggc_pch_count_object.  */
   the objects previously passed to ggc_pch_count_object.  */
extern size_t ggc_pch_total_size (struct ggc_pch_data *);
extern size_t ggc_pch_total_size (struct ggc_pch_data *);
 
 
/* The objects, when read, will most likely be at the address
/* The objects, when read, will most likely be at the address
   in the second parameter.  */
   in the second parameter.  */
extern void ggc_pch_this_base (struct ggc_pch_data *, void *);
extern void ggc_pch_this_base (struct ggc_pch_data *, void *);
 
 
/* Assuming that the objects really do end up at the address
/* Assuming that the objects really do end up at the address
   passed to ggc_pch_this_base, return the address of this object.
   passed to ggc_pch_this_base, return the address of this object.
   The bool argument should be true if the object is a string.  */
   The bool argument should be true if the object is a string.  */
extern char *ggc_pch_alloc_object (struct ggc_pch_data *, void *, size_t, bool,
extern char *ggc_pch_alloc_object (struct ggc_pch_data *, void *, size_t, bool,
                                   enum gt_types_enum);
                                   enum gt_types_enum);
 
 
/* Write out any initial information required.  */
/* Write out any initial information required.  */
extern void ggc_pch_prepare_write (struct ggc_pch_data *, FILE *);
extern void ggc_pch_prepare_write (struct ggc_pch_data *, FILE *);
 
 
/* Write out this object, including any padding.  The last argument should be
/* Write out this object, including any padding.  The last argument should be
   true if the object is a string.  */
   true if the object is a string.  */
extern void ggc_pch_write_object (struct ggc_pch_data *, FILE *, void *,
extern void ggc_pch_write_object (struct ggc_pch_data *, FILE *, void *,
                                  void *, size_t, bool);
                                  void *, size_t, bool);
 
 
/* All objects have been written, write out any final information
/* All objects have been written, write out any final information
   required.  */
   required.  */
extern void ggc_pch_finish (struct ggc_pch_data *, FILE *);
extern void ggc_pch_finish (struct ggc_pch_data *, FILE *);
 
 
/* A PCH file has just been read in at the address specified second
/* A PCH file has just been read in at the address specified second
   parameter.  Set up the GC implementation for the new objects.  */
   parameter.  Set up the GC implementation for the new objects.  */
extern void ggc_pch_read (FILE *, void *);
extern void ggc_pch_read (FILE *, void *);
 
 
 
 
/* Allocation and collection.  */
/* Allocation and collection.  */
 
 
/* When set, ggc_collect will do collection.  */
/* When set, ggc_collect will do collection.  */
extern bool ggc_force_collect;
extern bool ggc_force_collect;
 
 
extern void ggc_record_overhead (size_t, size_t, void * MEM_STAT_DECL);
extern void ggc_record_overhead (size_t, size_t, void * MEM_STAT_DECL);
 
 
extern void ggc_free_overhead (void *);
extern void ggc_free_overhead (void *);
 
 
extern void ggc_prune_overhead_list (void);
extern void ggc_prune_overhead_list (void);
 
 
/* Return the number of bytes allocated at the indicated address.  */
/* Return the number of bytes allocated at the indicated address.  */
extern size_t ggc_get_size (const void *);
extern size_t ggc_get_size (const void *);
 
 
 
 
/* Statistics.  */
/* Statistics.  */
 
 
/* This structure contains the statistics common to all collectors.
/* This structure contains the statistics common to all collectors.
   Particular collectors can extend this structure.  */
   Particular collectors can extend this structure.  */
typedef struct ggc_statistics
typedef struct ggc_statistics
{
{
  /* At present, we don't really gather any interesting statistics.  */
  /* At present, we don't really gather any interesting statistics.  */
  int unused;
  int unused;
} ggc_statistics;
} ggc_statistics;
 
 
/* Used by the various collectors to gather and print statistics that
/* Used by the various collectors to gather and print statistics that
   do not depend on the collector in use.  */
   do not depend on the collector in use.  */
extern void ggc_print_common_statistics (FILE *, ggc_statistics *);
extern void ggc_print_common_statistics (FILE *, ggc_statistics *);
 
 
#endif
#endif
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.