mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Merge remote-tracking branch 'origin/master' into hw
This commit is contained in:
commit
004681b02b
1
NEWS
1
NEWS
@ -12,6 +12,7 @@ v0.x.x (xxxx-xx-xx)
|
|||||||
- Improved function matching algorithm in compare traces view.
|
- Improved function matching algorithm in compare traces view.
|
||||||
- Added minimal CMake integration layer.
|
- Added minimal CMake integration layer.
|
||||||
- Reworked rpmalloc initialization.
|
- Reworked rpmalloc initialization.
|
||||||
|
- Fixed display of messages with newlines on messages list.
|
||||||
- Excluded some uninteresting wrapper functions from call stacks (for
|
- Excluded some uninteresting wrapper functions from call stacks (for
|
||||||
example SIMD pass-through intrinsics to the compiler built-ins).
|
example SIMD pass-through intrinsics to the compiler built-ins).
|
||||||
- Adjusted coloring of instruction hotness in symbol view.
|
- Adjusted coloring of instruction hotness in symbol view.
|
||||||
|
|||||||
@ -3,15 +3,17 @@
|
|||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
|
||||||
#include "../common/TracyAlloc.hpp"
|
#include "../common/TracyAlloc.hpp"
|
||||||
|
#include "../common/TracyForceInline.hpp"
|
||||||
#include "../common/TracyYield.hpp"
|
#include "../common/TracyYield.hpp"
|
||||||
|
|
||||||
namespace tracy
|
namespace tracy
|
||||||
{
|
{
|
||||||
|
|
||||||
|
extern thread_local bool RpThreadInitDone;
|
||||||
extern std::atomic<int> RpInitDone;
|
extern std::atomic<int> RpInitDone;
|
||||||
extern std::atomic<int> RpInitLock;
|
extern std::atomic<int> RpInitLock;
|
||||||
|
|
||||||
TRACY_API void InitRpmallocPlumbing()
|
tracy_no_inline static void InitRpmallocPlumbing()
|
||||||
{
|
{
|
||||||
const auto done = RpInitDone.load( std::memory_order_acquire );
|
const auto done = RpInitDone.load( std::memory_order_acquire );
|
||||||
if( !done )
|
if( !done )
|
||||||
@ -30,6 +32,11 @@ TRACY_API void InitRpmallocPlumbing()
|
|||||||
RpThreadInitDone = true;
|
RpThreadInitDone = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TRACY_API void InitRpmalloc()
|
||||||
|
{
|
||||||
|
if( !RpThreadInitDone ) InitRpmallocPlumbing();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -13,13 +13,7 @@ namespace tracy
|
|||||||
{
|
{
|
||||||
|
|
||||||
#ifdef TRACY_ENABLE
|
#ifdef TRACY_ENABLE
|
||||||
extern thread_local bool RpThreadInitDone;
|
TRACY_API void InitRpmalloc();
|
||||||
TRACY_API void InitRpmallocPlumbing();
|
|
||||||
|
|
||||||
static tracy_force_inline void InitRpmalloc()
|
|
||||||
{
|
|
||||||
if( !RpThreadInitDone ) InitRpmallocPlumbing();
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline void* tracy_malloc( size_t size )
|
static inline void* tracy_malloc( size_t size )
|
||||||
|
|||||||
@ -9476,10 +9476,12 @@ void View::DrawMessageLine( const MessageData& msg, bool hasCallstack, int& idx
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::TextDisabled( "(%s)", RealToString( tid ) );
|
ImGui::TextDisabled( "(%s)", RealToString( tid ) );
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
|
auto tend = text;
|
||||||
|
while( *tend != '\0' && *tend != '\n' ) tend++;
|
||||||
ImGui::PushStyleColor( ImGuiCol_Text, msg.color );
|
ImGui::PushStyleColor( ImGuiCol_Text, msg.color );
|
||||||
const auto cw = ImGui::GetContentRegionAvail().x;
|
const auto cw = ImGui::GetContentRegionAvail().x;
|
||||||
const auto tw = ImGui::CalcTextSize( text ).x;
|
const auto tw = ImGui::CalcTextSize( text, tend ).x;
|
||||||
ImGui::TextUnformatted( text );
|
ImGui::TextUnformatted( text, tend );
|
||||||
if( tw > cw && ImGui::IsItemHovered() )
|
if( tw > cw && ImGui::IsItemHovered() )
|
||||||
{
|
{
|
||||||
ImGui::SetNextWindowSize( ImVec2( 1000, 0 ) );
|
ImGui::SetNextWindowSize( ImVec2( 1000, 0 ) );
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user