Skip to content

Commit

Permalink
i915-perf: show details about the trace file
Browse files Browse the repository at this point in the history
  • Loading branch information
llandwerlin-intel authored and mikesart committed Dec 30, 2020
1 parent bd3efcd commit 879d723
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/gpuvis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3421,6 +3421,12 @@ void TraceWin::trace_render_info()

ImGui::EndColumns();
}

if ( m_trace_events.i915_perf_reader &&
ImGui::CollapsingHeader( "i915-perf info" ) )
{
m_i915_perf.counters.show_record_info( m_trace_events );
}
}

void TraceWin::graph_center_event( uint32_t eventid )
Expand Down
2 changes: 2 additions & 0 deletions src/gpuvis.h
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,8 @@ class I915PerfCounters

void render();

void show_record_info( TraceEvents &trace_events );

/* Associated process to a given i915-perf event. */
struct i915_perf_process {
const char *label;
Expand Down
51 changes: 51 additions & 0 deletions src/gpuvis_i915_perfcounters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,53 @@ void I915PerfCounters::render()
ImGui::EndChild();
}

void I915PerfCounters::show_record_info( TraceEvents &trace_events )
{
ImGui::Columns( 2, "##i915-record" );


ImGui::Text( "Number of GPU generated records");
ImGui::NextColumn();
ImGui::Text( "%u", trace_events.i915_perf_reader->n_records );
ImGui::NextColumn();
ImGui::Text( "Number of GPU timeline items");
ImGui::NextColumn();
ImGui::Text( "%u", trace_events.i915_perf_reader->n_timelines );
ImGui::NextColumn();
ImGui::Text( "Number of CPU/GPU correlation timestamp points" );
ImGui::NextColumn();
ImGui::Text( "%u", trace_events.i915_perf_reader->n_correlations );
ImGui::NextColumn();
ImGui::Text( "Metric set name" );
ImGui::NextColumn();
ImGui::Text( "%s", trace_events.i915_perf_reader->metric_set_name );
ImGui::NextColumn();
ImGui::Text( "Metric set uuid" );
ImGui::NextColumn();
ImGui::Text( "%s", trace_events.i915_perf_reader->metric_set_uuid );
ImGui::NextColumn();

const struct intel_perf *perf = trace_events.i915_perf_reader->perf;
if ( strlen( perf->devinfo.devname ) )
{
ImGui::Text( "Device name" );
ImGui::NextColumn();
ImGui::Text( "%s", perf->devinfo.devname );
ImGui::NextColumn();
}
if ( strlen( perf->devinfo.prettyname ) )
{
ImGui::Text( "Device pretty name" );
ImGui::NextColumn();
ImGui::Text( "%s", perf->devinfo.prettyname );
ImGui::NextColumn();
}
ImGui::Text( "Device execution units" );
ImGui::NextColumn();
ImGui::Text( "%lu", perf->devinfo.n_eus );
ImGui::EndColumns();
}

#else

void I915PerfCounters::init( TraceEvents &trace_events )
Expand All @@ -297,4 +344,8 @@ void I915PerfCounters::render()
{
}

void I915PerfCounters::show_record_info( TraceEvents &trace_events )
{
}

#endif

0 comments on commit 879d723

Please sign in to comment.