mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Add windows kernel module discovery.
This commit is contained in:
parent
8fa9860764
commit
2d5f6a411c
@ -256,7 +256,18 @@ const char* DecodeCallstackPtrFast( uint64_t ptr )
|
|||||||
|
|
||||||
static const char* GetModuleName( uint64_t addr )
|
static const char* GetModuleName( uint64_t addr )
|
||||||
{
|
{
|
||||||
if( ( addr >> 63 ) != 0 ) return "<kernel>";
|
if( ( addr >> 63 ) != 0 )
|
||||||
|
{
|
||||||
|
if( s_krnlCache )
|
||||||
|
{
|
||||||
|
auto it = std::lower_bound( s_krnlCache, s_krnlCache + s_krnlCacheCnt, addr, []( const KernelDriver& lhs, const uint64_t& rhs ) { return lhs.addr > rhs; } );
|
||||||
|
if( it != s_krnlCache + s_krnlCacheCnt )
|
||||||
|
{
|
||||||
|
return it->mod;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "<kernel>";
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef __CYGWIN__
|
#ifndef __CYGWIN__
|
||||||
for( auto& v : *s_modCache )
|
for( auto& v : *s_modCache )
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user