Cosmetics.

This commit is contained in:
Bartosz Taudul
2026-06-04 12:30:08 +02:00
parent a0b50ee68e
commit a8fab8c977

View File

@@ -9,13 +9,13 @@ namespace tracy
class TaggedUserlandAddress
{
uint64_t m_storage;
// So far no kernel seems to allow userspace address with more than 56bits userspace VAs since now hardware support it. See https://docs.kernel.org/next/x86/x86_64/mm.html and https://www.kernel.org/doc/html/v5.8/arm64/memory.html#bit-userspace-vas
// So far no kernel seems to allow userspace address with more than 56bits userspace VAs since now hardware support it.
// See https://docs.kernel.org/next/x86/x86_64/mm.html and https://www.kernel.org/doc/html/v5.8/arm64/memory.html#bit-userspace-vas
static constexpr uint64_t kUserspaceVABits = 56;
static constexpr uint64_t kKernelOnlyBits = 64 - kUserspaceVABits;
static constexpr uint64_t kKernelOnlyBitMask = ( ( uint64_t(1) << kKernelOnlyBits ) - uint64_t(1) ) << kUserspaceVABits;
public:
public:
TaggedUserlandAddress() = default;
explicit TaggedUserlandAddress( uint64_t address, uint8_t tag = 0 )
{
@@ -40,6 +40,9 @@ public:
m_storage = ( (uint64_t)tag << kUserspaceVABits ) | ( m_storage & ( ~kKernelOnlyBitMask ) );
}
uint8_t GetTag() const { return (uint8_t)( ( m_storage & kKernelOnlyBitMask ) >> kUserspaceVABits ); }
private:
uint64_t m_storage;
};
}