GCC Middle and Back End API Reference
vec_usage Class Reference
Inheritance diagram for vec_usage:
Collaboration diagram for vec_usage:

Public Member Functions

 vec_usage ()
 
 vec_usage (size_t allocated, size_t times, size_t peak, size_t items, size_t items_peak, size_t element_size)
 
vec_usage operator+ (const vec_usage &second)
 
void dump (mem_location *loc, mem_usage &total) const
 
void dump_footer ()
 
void register_overhead (size_t size)
 
void release_overhead (size_t size)
 
mem_usage operator+ (const mem_usage &second)
 
bool operator== (const mem_usage &second) const
 
bool operator< (const mem_usage &second) const
 
void dump (mem_location *loc, const mem_usage &total) const
 
void dump_footer () const
 

Static Public Member Functions

static void dump_header (const char *name)
 
static int compare (const void *first, const void *second)
 
static float get_percent (size_t nominator, size_t denominator)
 
static void print_dash_line (size_t count=140)
 

Data Fields

size_t m_items
 
size_t m_items_peak
 
size_t m_element_size
 
size_t m_allocated
 
size_t m_times
 
size_t m_peak
 
size_t m_instances
 

Detailed Description

Vector API for GNU compiler.
   Copyright (C) 2004-2024 Free Software Foundation, Inc.
   Contributed by Nathan Sidwell <nathan@codesourcery.com>
   Re-implemented in C++ by Diego Novillo <dnovillo@google.com>

This file is part of GCC.

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
Software Foundation; either version 3, or (at your option) any later
version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.   
This file is compiled twice: once for the generator programs
once for the compiler.   
Vector memory usage.   

Constructor & Destructor Documentation

◆ vec_usage() [1/2]

vec_usage::vec_usage ( )
inline

Referenced by operator+().

◆ vec_usage() [2/2]

vec_usage::vec_usage ( size_t allocated,
size_t times,
size_t peak,
size_t items,
size_t items_peak,
size_t element_size )
inline

Member Function Documentation

◆ compare()

static int mem_usage::compare ( const void * first,
const void * second )
inlinestaticinherited

◆ dump() [1/2]

◆ dump() [2/2]

◆ dump_footer() [1/2]

void mem_usage::dump_footer ( ) const
inlineinherited

◆ dump_footer() [2/2]

void vec_usage::dump_footer ( )
inline

◆ dump_header()

static void vec_usage::dump_header ( const char * name)
inlinestatic

◆ get_percent()

static float mem_usage::get_percent ( size_t nominator,
size_t denominator )
inlinestaticinherited

◆ operator+() [1/2]

mem_usage mem_usage::operator+ ( const mem_usage & second)
inlineinherited

◆ operator+() [2/2]

vec_usage vec_usage::operator+ ( const vec_usage & second)
inline

◆ operator<()

bool mem_usage::operator< ( const mem_usage & second) const
inlineinherited

◆ operator==()

bool mem_usage::operator== ( const mem_usage & second) const
inlineinherited

◆ print_dash_line()

static void mem_usage::print_dash_line ( size_t count = 140)
inlinestaticinherited

References count, and fputc().

Referenced by dump_tree_statistics().

◆ register_overhead()

void mem_usage::register_overhead ( size_t size)
inlineinherited

◆ release_overhead()

void mem_usage::release_overhead ( size_t size)
inlineinherited

Field Documentation

◆ m_allocated

◆ m_element_size

size_t vec_usage::m_element_size

◆ m_instances

size_t mem_usage::m_instances
inherited

◆ m_items

size_t vec_usage::m_items

◆ m_items_peak

size_t vec_usage::m_items_peak

Referenced by dump(), and operator+().

◆ m_peak

◆ m_times


The documentation for this class was generated from the following file: