sizeof (struct tree_list),
TREE_EXP_SIZE (2),
RTL_SIZE (2), /* MEM, PLUS, etc. */
- RTL_SIZE (9), /* INSN, CALL_INSN, JUMP_INSN */
+ RTL_SIZE (9), /* INSN */
};
/* The total number of orders. */
zero otherwise. We allocate them all together, to enable a
better runtime data access pattern. */
unsigned long **save_in_use;
-
#ifdef GATHER_STATISTICS
struct
{
- /* Total memory allocated with ggc_alloc */
+ /* Total memory allocated with ggc_alloc. */
unsigned long long total_allocated;
- /* Total overhead for memory to be allocated with ggc_alloc */
+ /* Total overhead for memory to be allocated with ggc_alloc. */
unsigned long long total_overhead;
/* Total allocations and overhead for sizes less than 32, 64 and 128.
unsigned long long total_allocated_under128;
unsigned long long total_overhead_under128;
+ /* The allocations for each of the allocation orders. */
+ unsigned long long total_allocated_per_order[NUM_ORDERS];
+
/* The overhead for each of the allocation orders. */
unsigned long long total_overhead_per_order[NUM_ORDERS];
} stats;
#ifdef GATHER_STATISTICS
{
G.stats.total_overhead += OBJECT_SIZE (order) - size;
- G.stats.total_overhead_per_order[order] += OBJECT_SIZE (order) - size;
G.stats.total_allocated += OBJECT_SIZE(order);
+ G.stats.total_overhead_per_order[order] += OBJECT_SIZE (order) - size;
+ G.stats.total_allocated_per_order[order] += OBJECT_SIZE (order);
if (size <= 32){
G.stats.total_overhead_under32 += OBJECT_SIZE (order) - size;
/* Collect some information about the various sizes of
allocation. */
+ fprintf (stderr,
+ "Memory still allocated at the end of the compilation process\n");
fprintf (stderr, "%-5s %10s %10s %10s\n",
"Size", "Allocated", "Used", "Overhead");
for (i = 0; i < NUM_ORDERS; ++i)
#ifdef GATHER_STATISTICS
{
+ fprintf (stderr, "\nTotal allocations and overheads during the compilation process\n");
+
fprintf (stderr, "Total Overhead: %10lld\n",
G.stats.total_overhead);
fprintf (stderr, "Total Allocated: %10lld\n",
G.stats.total_allocated_under128);
for (i = 0; i < NUM_ORDERS; i++)
- if (G.stats.total_overhead_per_order[i])
- fprintf (stderr, "Total Overhead page size %7d: %10lld\n",
- OBJECT_SIZE (i), G.stats.total_overhead_per_order[i]);
+ if (G.stats.total_allocated_per_order[i])
+ {
+ fprintf (stderr, "Total Overhead page size %7d: %10lld\n",
+ OBJECT_SIZE (i), G.stats.total_overhead_per_order[i]);
+ fprintf (stderr, "Total Allocated page size %7d: %10lld\n",
+ OBJECT_SIZE (i), G.stats.total_allocated_per_order[i]);
+ }
}
#endif
}