From d9a6ba7f8c4ecc4610ec71142e9f7d3ab226f2b5 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Fri, 10 Apr 2020 18:02:50 +0300 Subject: [PATCH] Hide intel GPU generated event row when we don't have any Having this empty row for captures done on AMD or when i915-perf support disabled doesn't make sense. Signed-off-by: Lionel Landwerlin --- src/gpuvis_graphrows.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gpuvis_graphrows.cpp b/src/gpuvis_graphrows.cpp index a45d8d12..0ed1750a 100644 --- a/src/gpuvis_graphrows.cpp +++ b/src/gpuvis_graphrows.cpp @@ -310,7 +310,8 @@ void GraphRows::init( TraceEvents &trace_events ) // Intel gpu events { - push_row( "i915-perf", LOC_TYPE_i915Perf, trace_events.m_i915.perf_locs.size() ); + if ( !trace_events.m_i915.perf_locs.empty() ) + push_row( "i915-perf", LOC_TYPE_i915Perf, trace_events.m_i915.perf_locs.size() ); for ( auto &req_locs : trace_events.m_i915.req_locs.m_locs.m_map ) {