mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Use captured program name in CPU data.
This fixes android application names, which are cut to show only last 15-or-so letters.
This commit is contained in:
parent
f76f38777e
commit
8bb13ca09e
@ -10484,14 +10484,16 @@ void View::DrawCpuDataWindow()
|
|||||||
char buf[128];
|
char buf[128];
|
||||||
auto& pid = *pidit;
|
auto& pid = *pidit;
|
||||||
const auto pidMatch = thisPid != 0 && thisPid == pid.first;
|
const auto pidMatch = thisPid != 0 && thisPid == pid.first;
|
||||||
|
auto name = m_worker.GetExternalName( pid.second.tids[0] ).first;
|
||||||
if( pidMatch )
|
if( pidMatch )
|
||||||
{
|
{
|
||||||
|
name = m_worker.GetCaptureProgram().c_str();
|
||||||
ImGui::PushStyleColor( ImGuiCol_Text, ImVec4( 0.2f, 1.0f, 0.2f, 1.0f ) );
|
ImGui::PushStyleColor( ImGuiCol_Text, ImVec4( 0.2f, 1.0f, 0.2f, 1.0f ) );
|
||||||
}
|
}
|
||||||
const auto pidtxt = pid.first == 0 ? "Unknown" : RealToString( pid.first, true );
|
const auto pidtxt = pid.first == 0 ? "Unknown" : RealToString( pid.first, true );
|
||||||
const auto expand = ImGui::TreeNode( pidtxt );
|
const auto expand = ImGui::TreeNode( pidtxt );
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::TextUnformatted( m_worker.GetExternalName( pid.second.tids[0] ).first );
|
ImGui::TextUnformatted( name );
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
sprintf( buf, "%s (%.2f%%)", TimeToString( pid.second.data.runningTime ), double( pid.second.data.runningTime ) * rtimespan * 100 );
|
sprintf( buf, "%s (%.2f%%)", TimeToString( pid.second.data.runningTime ), double( pid.second.data.runningTime ) * rtimespan * 100 );
|
||||||
ImGui::ProgressBar( double( pid.second.data.runningTime ) * rtimespan, ImVec2( -1, ty ), buf );
|
ImGui::ProgressBar( double( pid.second.data.runningTime ) * rtimespan, ImVec2( -1, ty ), buf );
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user