Skip to content

Commit

Permalink
[Media Common] enable perf utility for release version
Browse files Browse the repository at this point in the history
[Media Common] enable perf utility for release version

Change-Id: I116c00a88fa11307ab757941ec5716a848720b6a
  • Loading branch information
yangning1368 authored and intel-mediadev committed Sep 7, 2020
1 parent 095d3bc commit d37e135
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
12 changes: 1 addition & 11 deletions media_driver/agnostic/common/os/mos_os.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ extern PerfUtility *g_perfutility;
((sCOMP == "MOS" && sLEVEL == "DDI") && (g_perfutility->dwPerfUtilityIsEnabled & MOS_DDI)) || \
((sCOMP == "MOS" && sLEVEL == "HAL") && (g_perfutility->dwPerfUtilityIsEnabled & MOS_HAL)))

#if _RELEASE_INTERNAL
#define PERF_UTILITY_START(TAG,COMP,LEVEL) \
do \
{ \
Expand Down Expand Up @@ -124,21 +123,12 @@ static int perf_count_stop = 0;
#define PERF_UTILITY_PRINT \
do \
{ \
if (g_perfutility->dwPerfUtilityIsEnabled) \
if (g_perfutility->dwPerfUtilityIsEnabled && MosUtilities::MosIsProfilerDumpEnabled()) \
{ \
g_perfutility->savePerfData(); \
} \
} while(0)

#else
#define PERF_UTILITY_START(TAG, COMP,LEVEL) do {} while(0)
#define PERF_UTILITY_STOP(TAG, COMP,LEVEL) do {} while(0)
#define PERF_UTILITY_START_ONCE(TAG, COMP,LEVEL) do {} while(0)
#define PERF_UTILITY_STOP_ONCE(TAG, COMP,LEVEL) do {} while(0)
#define PERF_UTILITY_AUTO(TAG,COMP,LEVEL) do {} while(0)
#define PERF_UTILITY_PRINT do {} while(0)
#endif

class AutoPerfUtility
{
public:
Expand Down
3 changes: 1 addition & 2 deletions media_driver/linux/common/ddi/media_libva.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1692,7 +1692,7 @@ VAStatus DdiMedia__Initialize (
// prepare m_osContext
MosUtilities::MosUtilitiesInit(nullptr);
//Read user feature key here for Per Utility Tool Enabling
#if _RELEASE_INTERNAL

if (!g_perfutility->bPerfUtilityKey)
{
MOS_USER_FEATURE_VALUE_DATA UserFeatureData;
Expand Down Expand Up @@ -1726,7 +1726,6 @@ VAStatus DdiMedia__Initialize (

g_perfutility->bPerfUtilityKey = true;
}
#endif

mediaCtx->pDrmBufMgr = mos_bufmgr_gem_init(mediaCtx->fd, DDI_CODEC_BATCH_BUFFER_SIZE);
if (nullptr == mediaCtx->pDrmBufMgr)
Expand Down

0 comments on commit d37e135

Please sign in to comment.