30 #ifndef _GLIBCXX_PROFILE_PROFILER_CONTAINER_SIZE_H 31 #define _GLIBCXX_PROFILE_PROFILER_CONTAINER_SIZE_H 1 48 _M_min(0), _M_total(0), _M_item_min(0), _M_item_max(0),
49 _M_item_total(0), _M_count(0), _M_resize(0), _M_cost(0)
53 __write(FILE* __f)
const 55 std::fprintf(__f,
"%Zu %Zu %Zu %Zu %Zu %Zu %Zu %Zu %Zu %Zu\n",
56 _M_init, _M_count, _M_cost, _M_resize, _M_min, _M_max,
57 _M_total, _M_item_min, _M_item_max, _M_item_total);
62 {
return static_cast<float>(_M_cost); }
68 if (_M_init < _M_item_max)
69 __message <<
"change initial container size from " << _M_init
70 <<
" to " << _M_item_max;
71 return __message.
str();
75 __init(std::size_t __num)
84 __object_info_base::__merge(__o);
85 _M_init =
std::max(_M_init, __o._M_init);
86 _M_max =
std::max(_M_max, __o._M_max);
87 _M_item_max =
std::max(_M_item_max, __o._M_item_max);
88 _M_min =
std::min(_M_min, __o._M_min);
89 _M_item_min =
std::min(_M_item_min, __o._M_item_min);
90 _M_total += __o._M_total;
91 _M_item_total += __o._M_item_total;
92 _M_count += __o._M_count;
93 _M_cost += __o._M_cost;
94 _M_resize += __o._M_resize;
99 __destruct(std::size_t __num, std::size_t __inum)
102 _M_item_max =
std::max(_M_item_max, __inum);
106 _M_item_min = __inum;
111 _M_item_min =
std::min(_M_item_min, __inum);
115 _M_item_total += __inum;
121 __resize_cost(std::size_t __from, std::size_t)
126 __resize(std::size_t __from, std::size_t __to)
128 _M_cost += this->__resize_cost(__from, __to);
137 std::size_t _M_total;
138 std::size_t _M_item_min;
139 std::size_t _M_item_max;
140 std::size_t _M_item_total;
141 std::size_t _M_count;
142 std::size_t _M_resize;
157 :
public __trace_base<__container_size_info, __container_size_stack_info>
167 __insert(__stack_t __stack, std::size_t __num)
171 __ret->__init(__num);
178 std::size_t __num, std::size_t __inum)
180 __obj_info->__destruct(__num, __inum);
181 __retire_object(__obj_info);
GNU profile code for public use.
A container size instrumentation line in the object table.
Interface of the profiling runtime library.
Container size instrumentation trace producer.
Data structures to represent profiling traces.
Data structures to represent a single profiling event.
_GLIBCXX14_CONSTEXPR const _Tp & min(const _Tp &, const _Tp &)
This does what you think it does.
Base class for a line in the object table.
Base class for all trace producers.
A container size instrumentation line in the stack table.
Controlling input and output for std::string.
__string_type str() const
Copying out the string buffer.
_GLIBCXX14_CONSTEXPR const _Tp & max(const _Tp &, const _Tp &)
This does what you think it does.