30 #ifndef _GLIBCXX_PROFILE_PROFILER_HASH_FUNC_H 31 #define _GLIBCXX_PROFILE_PROFILER_HASH_FUNC_H 1 46 _M_accesses(0), _M_hops(0) { }
51 __object_info_base::__merge(__o);
52 _M_longest_chain =
std::max(_M_longest_chain, __o._M_longest_chain);
53 _M_accesses += __o._M_accesses;
54 _M_hops += __o._M_hops;
58 __destruct(std::size_t __chain, std::size_t __accesses,
61 _M_longest_chain =
std::max(_M_longest_chain, __chain);
62 _M_accesses += __accesses;
67 __write(FILE* __f)
const 68 { std::fprintf(__f,
"%Zu %Zu %Zu\n", _M_hops,
69 _M_accesses, _M_longest_chain); }
73 {
return static_cast<float>(_M_hops); }
77 {
return "change hash function"; }
80 std::size_t _M_longest_chain;
81 std::size_t _M_accesses;
96 :
public __trace_base<__hashfunc_info, __hashfunc_stack_info>
101 { __id =
"hash-distr"; }
108 std::size_t __chain, std::size_t __accesses, std::size_t __hops)
113 __obj_info->__destruct(__chain, __accesses, __hops);
114 __retire_object(__obj_info);
119 __trace_hash_func_init()
123 __trace_hash_func_free()
124 {
delete _GLIBCXX_PROFILE_DATA(_S_hash_func); }
127 __trace_hash_func_report(FILE* __f, __warning_vector_t& __warnings)
128 { __trace_report(_GLIBCXX_PROFILE_DATA(_S_hash_func), __f, __warnings); }
131 __trace_hash_func_construct()
136 if (!__reentrance_guard::__get_in())
140 return _GLIBCXX_PROFILE_DATA(_S_hash_func)->__add_object(__get_stack());
145 std::size_t __chain, std::size_t __accesses,
148 _GLIBCXX_PROFILE_DATA(_S_hash_func)->__destruct(__obj_info, __chain,
GNU profile code for public use.
Hash performance instrumentation producer.
Interface of the profiling runtime library.
bool __profcxx_init()
This function must be called by each instrumentation point.
Data structures to represent profiling traces.
A hash performance instrumentation line in the object table.
Data structures to represent a single profiling event.
Base class for a line in the object table.
Base class for all trace producers.
A hash performance instrumentation line in the stack table.
_GLIBCXX14_CONSTEXPR const _Tp & max(const _Tp &, const _Tp &)
This does what you think it does.