30 #ifndef _GLIBCXX_PROFILE_PROFILER_HASH_FUNC_H
31 #define _GLIBCXX_PROFILE_PROFILER_HASH_FUNC_H 1
45 : _M_longest_chain(0), _M_accesses(0), _M_hops(0) { }
49 _M_accesses(__o._M_accesses), _M_hops(__o._M_hops) { }
53 _M_accesses(0), _M_hops(0) { }
60 _M_longest_chain =
std::max(_M_longest_chain, __o._M_longest_chain);
61 _M_accesses += __o._M_accesses;
62 _M_hops += __o._M_hops;
66 __destruct(std::size_t __chain, std::size_t __accesses,
69 _M_longest_chain =
std::max(_M_longest_chain, __chain);
70 _M_accesses += __accesses;
75 __write(FILE* __f)
const
76 { std::fprintf(__f,
"%Zu %Zu %Zu\n", _M_hops,
77 _M_accesses, _M_longest_chain); }
81 {
return static_cast<float>(_M_hops); }
85 {
return "change hash function"; }
88 std::size_t _M_longest_chain;
89 std::size_t _M_accesses;
106 :
public __trace_base<__hashfunc_info, __hashfunc_stack_info>
111 { __id =
"hash-distr"; }
117 __insert(__object_t __obj, __stack_t __stack)
122 __destruct(
const void* __obj, std::size_t __chain,
123 std::size_t __accesses, std::size_t __hops)
133 __objs->__destruct(__chain, __accesses, __hops);
134 __retire_object(__obj);
140 __trace_hash_func_init()
144 __trace_hash_func_report(FILE* __f, __warning_vector_t& __warnings)
146 if (_GLIBCXX_PROFILE_DATA(_S_hash_func))
148 _GLIBCXX_PROFILE_DATA(_S_hash_func)->__collect_warnings(__warnings);
149 _GLIBCXX_PROFILE_DATA(_S_hash_func)->__write(__f);
154 __trace_hash_func_construct(
const void* __obj)
159 _GLIBCXX_PROFILE_DATA(_S_hash_func)->__insert(__obj, __get_stack());
163 __trace_hash_func_destruct(
const void* __obj, std::size_t __chain,
164 std::size_t __accesses, std::size_t __hops)
169 _GLIBCXX_PROFILE_DATA(_S_hash_func)->__destruct(__obj, __chain,
GNU profile code for public use.
Base class for all trace producers.
const _Tp & max(const _Tp &, const _Tp &)
This does what you think it does.
A hash performance instrumentation line in the object table.
Data structures to represent profiling traces.
Hash performance instrumentation producer.
bool __profcxx_init()
This function must be called by each instrumentation point.
Interface of the profiling runtime library.
Base class for a line in the object table.
Data structures to represent a single profiling event.
A hash performance instrumentation line in the stack table.