#include <profile.hpp>
|
std::size_t | hash () const |
|
std::size_t | hash () const |
|
Definition at line 104 of file profile.hpp.
◆ hash() [1/2]
std::size_t sysio::vm::profile_data::item::hash |
( |
| ) |
const |
|
inline |
Definition at line 112 of file profile.hpp.
112 {
113
114
116
117 static_assert(offsetof(item,
len) % 8 == 0);
118 constexpr std::uint64_t
mul = 0xc6a4a7935bd1e995ull;
119 constexpr std::uint64_t seed = 0xbadd00d00ull;
120 constexpr auto shift_mix = [](std::uint64_t v) { return v ^ (v >> 47); };
121 int word_len =
len/2+1;
123 const char* base_addr =
reinterpret_cast<const char*
>(&
len);
124 for(int i = 0; i < word_len; ++i) {
125 std::uint64_t val;
126 memcpy(&val, base_addr + 8*i, 8);
127 hash = (hash ^ shift_mix(val *
mul) *
mul) *
mul;
128 }
129 return shift_mix(shift_mix(hash) *
mul);
130 }
unsigned __int64 uint64_t
static constexpr std::size_t max_frames
void mul(const Operand &op)
memcpy((char *) pInfo->slotDescription, s, l)
◆ hash() [2/2]
std::size_t sysio::vm::profile_data::item::hash |
( |
| ) |
const |
|
inline |
Definition at line 112 of file profile.hpp.
112 {
113
114
116
117 static_assert(offsetof(item,
len) % 8 == 0);
118 constexpr std::uint64_t
mul = 0xc6a4a7935bd1e995ull;
119 constexpr std::uint64_t seed = 0xbadd00d00ull;
120 constexpr auto shift_mix = [](std::uint64_t v) { return v ^ (v >> 47); };
121 int word_len =
len/2+1;
123 const char* base_addr =
reinterpret_cast<const char*
>(&
len);
124 for(int i = 0; i < word_len; ++i) {
125 std::uint64_t val;
126 memcpy(&val, base_addr + 8*i, 8);
127 hash = (hash ^ shift_mix(val *
mul) *
mul) *
mul;
128 }
129 return shift_mix(shift_mix(hash) *
mul);
130 }
◆ bucket
uint32_t sysio::vm::profile_data::item::bucket = 0xFFFFFFFF |
◆ count
uint32_t sysio::vm::profile_data::item::count = 0 |
◆ frames
uint32_t sysio::vm::profile_data::item::frames |
◆ len
uint32_t sysio::vm::profile_data::item::len |
◆ mru
◆ next
item * sysio::vm::profile_data::item::next |
The documentation for this struct was generated from the following files: