Skip to content
This repository was archived by the owner on Apr 30, 2020. It is now read-only.

Commit f38a756

Browse files
committed
CodeXL 2.5 Release
1 parent 8a4c3a5 commit f38a756

32 files changed

Lines changed: 200 additions & 115 deletions

CodeXL/AMDTApplicationFramework/Include/afAppStringConstants.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -779,8 +779,8 @@
779779
#define AF_STR_SystemInformationCommandVendorID L"Vendor ID"
780780
#define AF_STR_SystemInformationCommandCpuFamily L"CPU Family"
781781
#define AF_STR_SystemInformationCommandPipePrefix L"AMDT_SI_PIPE_NAME"
782-
#define AF_STR_SystemInformationCommandHelper32Name L"AMDTSystemInformationHelper"
783-
#define AF_STR_SystemInformationCommandHelper64Name L"AMDTSystemInformationHelper-x64"
782+
#define AF_STR_SystemInformationCommandHelper32Name L"CXLSystemInformationHelper"
783+
#define AF_STR_SystemInformationCommandHelper64Name L"CXLSystemInformationHelper-x64"
784784
#define AF_STR_SystemInformationCommandTimeOut L"System Information gathering timed out after 10s"
785785

786786
// Context Information dialog
114 KB
Binary file not shown.

CodeXL/Components/GpuProfiling/AMDTGpuProfiling/CounterManager.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ const QString CounterManager::ms_GFX7_FAMILY_ENV_VAR_VALUE = "GFX7";
5555
const QString CounterManager::ms_GFX8_FAMILY_ENV_VAR_VALUE = "GFX8";
5656
const QString CounterManager::ms_GFX9_FAMILY_ENV_VAR_VALUE = "GFX9";
5757

58-
const int CounterManager::ms_GFX6_PLACEHOLDER_DEVICE_ID = 0x6798; // a Tahiti device
59-
const int CounterManager::ms_GFX7_PLACEHOLDER_DEVICE_ID = 0x6650; // a Bonaire device
60-
const int CounterManager::ms_GFX8_PLACEHOLDER_DEVICE_ID = 0x6900; // an Iceland device
61-
const int CounterManager::ms_GFX9_PLACEHOLDER_DEVICE_ID = 0x6860; // a Vega device
58+
const size_t CounterManager::ms_GFX6_PLACEHOLDER_DEVICE_ID = 0x6798; // a Tahiti device
59+
const size_t CounterManager::ms_GFX7_PLACEHOLDER_DEVICE_ID = 0x6649; // a Bonaire device
60+
const size_t CounterManager::ms_GFX8_PLACEHOLDER_DEVICE_ID = 0x6900; // an Iceland device
61+
const size_t CounterManager::ms_GFX9_PLACEHOLDER_DEVICE_ID = 0x6860; // a Vega device
6262

63-
const int CounterManager::ms_UNSPECIFIED_REV_ID = 0;
63+
const size_t CounterManager::ms_UNSPECIFIED_REV_ID = static_cast<size_t>(REVISION_ID_ANY);
6464

6565
const int CounterManager::ms_AMD_VENDOR_ID = 0x1002;
6666

@@ -359,7 +359,7 @@ void CounterManager::LoadCountersModule()
359359
}
360360
}
361361

362-
void CounterManager::AddDeviceId(int deviceId, int revId)
362+
void CounterManager::AddDeviceId(size_t deviceId, size_t revId)
363363
{
364364
GDT_GfxCardInfo gfxCardInfo;
365365

@@ -394,7 +394,7 @@ void CounterManager::AddDeviceId(int deviceId, int revId)
394394
}
395395
}
396396

397-
void CounterManager::AddDeviceIdToFamily(HardwareFamily hardwareFamily, int deviceId, int revId)
397+
void CounterManager::AddDeviceIdToFamily(HardwareFamily hardwareFamily, size_t deviceId, size_t revId)
398398
{
399399
QList<DeviceAndRevInfo> deviceInfoList;
400400

CodeXL/Components/GpuProfiling/AMDTGpuProfiling/CounterManager.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,12 @@ class AMDT_GPU_PROF_API CounterManager : public TSingleton<CounterManager>
192192
static const QString ms_GFX7_FAMILY_NAME; ///< string constant for the GFX7 hardware family name
193193
static const QString ms_GFX8_FAMILY_NAME; ///< string constant for the GFX8 hardware family name
194194
static const QString ms_GFX9_FAMILY_NAME; ///< string constant for the GFX9 hardware family name
195-
static const int ms_GFX6_PLACEHOLDER_DEVICE_ID; ///< placeholder device id for a GFX6 device
196-
static const int ms_GFX7_PLACEHOLDER_DEVICE_ID; ///< placeholder device id for a GFX7 device
197-
static const int ms_GFX8_PLACEHOLDER_DEVICE_ID; ///< placeholder device id for a GFX8 device
198-
static const int ms_GFX9_PLACEHOLDER_DEVICE_ID; ///< placeholder device id for a GFX9 device
199-
static const int ms_UNSPECIFIED_REV_ID; ///< unspecified device revision id
200-
static const int ms_AMD_VENDOR_ID; ///< AMD vendor id
195+
static const size_t ms_GFX6_PLACEHOLDER_DEVICE_ID; ///< placeholder device id for a GFX6 device
196+
static const size_t ms_GFX7_PLACEHOLDER_DEVICE_ID; ///< placeholder device id for a GFX7 device
197+
static const size_t ms_GFX8_PLACEHOLDER_DEVICE_ID; ///< placeholder device id for a GFX8 device
198+
static const size_t ms_GFX9_PLACEHOLDER_DEVICE_ID; ///< placeholder device id for a GFX9 device
199+
static const size_t ms_UNSPECIFIED_REV_ID; ///< unspecified device revision id
200+
static const int ms_AMD_VENDOR_ID; ///< AMD vendor id
201201

202202
/// typedef used for counter indices
203203
struct CounterIndices
@@ -260,13 +260,13 @@ class AMDT_GPU_PROF_API CounterManager : public TSingleton<CounterManager>
260260
/// NA_HARDWARE_FAMILY family
261261
/// \param deviceId the device id to add to the hardware family
262262
/// \param revId the revision id to add to the hardware family
263-
void AddDeviceId(int deviceId, int revId);
263+
void AddDeviceId(size_t deviceId, size_t revId);
264264

265265
/// Adds the specified device id to the list of devices for the specified hardware family
266266
/// \param hardwareFamily the hardware family to which the device should be added
267267
/// \param deviceId the device id to add to the hardware family
268268
/// \param revId the revision id to add to the hardware family
269-
void AddDeviceIdToFamily(HardwareFamily hardwareFamily, int deviceId, int revId);
269+
void AddDeviceIdToFamily(HardwareFamily hardwareFamily, size_t deviceId, size_t revId);
270270

271271
/// Updates the m_counterIndices after the counters have been sorted
272272
/// \param counterNames the sorted list of counters
@@ -276,8 +276,8 @@ class AMDT_GPU_PROF_API CounterManager : public TSingleton<CounterManager>
276276
// structure for holding device id and rev id for installed devices
277277
struct DeviceAndRevInfo
278278
{
279-
int m_deviceID; ///< device id
280-
int m_revID; ///< rev id
279+
size_t m_deviceID; ///< device id
280+
size_t m_revID; ///< rev id
281281
};
282282

283283
osModuleHandle m_gpaCountersModuleHandle; ///< module handle for GPACounters DLL

CodeXL/Components/GpuProfiling/AMDTGpuProfiling/HSATimelineItems.cpp

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,30 @@ void HSAMemoryTimelineItem::tooltipItems(acTimelineItemToolTip& tooltip) const
115115
tooltip.add(tr("Size"), QString(tr("%1")).arg(m_size));
116116
}
117117

118-
HSAMemoryTransferTimelineItem::HSAMemoryTransferTimelineItem(quint64 transferStartTime, quint64 transferEndTime, int apiIndex, size_t size, QString srcAgent, QString dstAgent)
119-
: HSAMemoryTimelineItem(transferStartTime, transferEndTime, apiIndex, size), m_srcAgent(srcAgent), m_dstAgent(dstAgent)
118+
HSAMemoryTransferTimelineItem::HSAMemoryTransferTimelineItem(
119+
quint64 transferStartTime,
120+
quint64 transferEndTime,
121+
int apiIndex,
122+
size_t size,
123+
QString srcAgentHandle,
124+
QString srcAgentName,
125+
QString dstAgentHandle,
126+
QString dstAgentName):
127+
HSAMemoryTimelineItem(transferStartTime, transferEndTime, apiIndex, size),
128+
m_srcAgentHandle(srcAgentHandle),
129+
m_srcAgentName(srcAgentName),
130+
m_dstAgentHandle(dstAgentHandle),
131+
m_dstAgentName(dstAgentName)
120132
{
121133
}
122134

123135
void HSAMemoryTransferTimelineItem::tooltipItems(acTimelineItemToolTip& tooltip) const
124136
{
125137
tooltip.add(tr("Name"), m_strText);
126-
tooltip.add(tr("Source Agent Handle"), m_srcAgent);
127-
tooltip.add(tr("Destination Agent Handle"), m_dstAgent);
138+
tooltip.add(tr("Source Agent Handle"), m_srcAgentHandle);
139+
tooltip.add(tr("Source Agent Name"), m_srcAgentName);
140+
tooltip.add(tr("Destination Agent Handle"), m_dstAgentHandle);
141+
tooltip.add(tr("Destination Agent Name"), m_dstAgentName);
128142

129143
acTimeline* timeline = m_pParentBranch->parentTimeline();
130144

CodeXL/Components/GpuProfiling/AMDTGpuProfiling/HSATimelineItems.h

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class HSADispatchTimelineItem : public HostAPITimelineItem
8080

8181
/// Fill in a TimelineItemToolTip instance with a set of name/value pairs that will be displayed in the tooltip for this timeline item
8282
/// \param tooltip acTimelineItemToolTip instance that should get populated with name/value pairs
83-
virtual void tooltipItems(acTimelineItemToolTip& tooltip) const;
83+
virtual void tooltipItems(acTimelineItemToolTip& tooltip) const override;
8484

8585
private:
8686
QString m_strQueueHandle; ///< the queue handle for this API
@@ -104,7 +104,7 @@ class HSAMemoryTimelineItem : public HostAPITimelineItem
104104

105105
/// Fill in a TimelineItemToolTip instance with a set of name/value pairs that will be displayed in the tooltip for this timeline item
106106
/// \param tooltip acTimelineItemToolTip instance that should get populated with name/value pairs
107-
virtual void tooltipItems(acTimelineItemToolTip& tooltip) const;
107+
virtual void tooltipItems(acTimelineItemToolTip& tooltip) const override;
108108

109109
protected:
110110
size_t m_size; ///< the memory size for this API
@@ -119,17 +119,29 @@ class HSAMemoryTransferTimelineItem : public HSAMemoryTimelineItem
119119
/// \param transferEndTime the end time for this data transfer.
120120
/// \param apiIndex the index of this api in the application's call sequence
121121
/// \param size the size of the memory operation
122-
/// \param srcAgent the source agent of the memory transfer
123-
/// \param dstAgent the destination agent of the memory transfer
124-
HSAMemoryTransferTimelineItem(quint64 transferStartTime, quint64 transferEndTime, int apiIndex, size_t size, QString srcAgent, QString dstAgent);
122+
/// \param srcAgentHandle the source agent handle of the memory transfer
123+
/// \param srcAgentName the source agent name of the memory transfer
124+
/// \param dstAgentHandle the destination agent handle of the memory transfer
125+
/// \param dstAgentName the destination agent name of the memory transfer
126+
HSAMemoryTransferTimelineItem(
127+
quint64 transferStartTime,
128+
quint64 transferEndTime,
129+
int apiIndex,
130+
size_t size,
131+
QString srcAgentHandle,
132+
QString srcAgentName,
133+
QString dstAgentHandle,
134+
QString dstAgentName);
125135

126136
/// Fill in a TimelineItemToolTip instance with a set of name/value pairs that will be displayed in the tooltip for this timeline item
127137
/// \param tooltip acTimelineItemToolTip instance that should get populated with name/value pairs
128-
virtual void tooltipItems(acTimelineItemToolTip& tooltip) const;
138+
virtual void tooltipItems(acTimelineItemToolTip& tooltip) const override;
129139

130140
protected:
131-
QString m_srcAgent; ///< the source agent of the transfer
132-
QString m_dstAgent; ///< the destination agent of the transfer
141+
QString m_srcAgentHandle; ///< the source agent handle of the transfer
142+
QString m_srcAgentName; ///< the source agent name of the transfer
143+
QString m_dstAgentHandle; ///< the destination agent handle of the transfer
144+
QString m_dstAgentName; ///< the destination agent name of the transfer
133145
};
134146

135147
#endif // _HSA_TIMELINE_ITEMS_H_

CodeXL/Components/GpuProfiling/AMDTGpuProfiling/ProfileManager.cpp

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,7 +1681,7 @@ bool ProfileManager::GenerateOccupancyPage(GPUSessionTreeItemData* pSessionData,
16811681
// Generate the path of the output file
16821682
m_strOutputOccHTMLPage = QString("%1%2_%3_%4_Occupancy.html")
16831683
.arg(sessionDirStr)
1684-
.arg(QString().fromStdString(pOccInfo->GetKernelName()))
1684+
.arg(QString::fromStdString(pOccInfo->GetKernelName()))
16851685
.arg(pOccInfo->GetThreadId())
16861686
.arg(callIndex);
16871687

@@ -1707,7 +1707,7 @@ bool ProfileManager::GenerateOccupancyPage(GPUSessionTreeItemData* pSessionData,
17071707
}
17081708
else
17091709
{
1710-
strErrorMessageOut.fromStdString(errorMessage);
1710+
strErrorMessageOut = QString::fromStdString(errorMessage);
17111711
}
17121712
}
17131713
else
@@ -1979,14 +1979,22 @@ void ProfileManager::HandleProfileFinished(int exitCode)
19791979

19801980
void ProfileManager::HandleMissingProfileOutput(QString& strError)
19811981
{
1982-
QString strProjectType = (m_pCurrentProjectSettings->m_traceOptions.m_apiToTrace == APIToTrace_OPENCL) ? "an OpenCL program" : "an HSA program";
1982+
QString strProjectType;
1983+
1984+
if (m_profileParameters.ProfileTypeValue() == API_TRACE)
1985+
{
1986+
strProjectType = (m_pCurrentProjectSettings->m_traceOptions.m_apiToTrace == APIToTrace_OPENCL) ? "an OpenCL program" : "an HSA program";
1987+
}
1988+
else if (m_profileParameters.ProfileTypeValue() == PERFORMANCE)
1989+
{
1990+
strProjectType = (m_pCurrentProjectSettings->m_counterOptions.m_api == APIToTrace_OPENCL) ? "an OpenCL program" : "an HSA program";
1991+
}
1992+
19831993
QString strExtraReason;
19841994
strExtraReason.clear();
19851995

19861996
if (m_profileParameters.ProfileTypeValue() == API_TRACE)
19871997
{
1988-
strProjectType = (m_pCurrentProjectSettings->m_traceOptions.m_apiToTrace == APIToTrace_OPENCL) ? "an OpenCL program" : "an HSA program";
1989-
19901998
// in timeout mode, the backend does not produce an .atp file if all APIs called were filtered away
19911999
if (m_pCurrentProjectSettings->m_traceOptions.m_mode == TIMEOUT)
19922000
{
@@ -1997,8 +2005,14 @@ void ProfileManager::HandleMissingProfileOutput(QString& strError)
19972005
}
19982006
else
19992007
{
2000-
strProjectType += ".</li><li>The active project is an OpenCL program, but it did not enqueue any kernels.";
2001-
strProjectType += ".</li><li>The active project is an OpenCL program, but it did not enqueue any kernels listed in the Profile Specific Kernels section";
2008+
QString thisReason = QString(".</li><li>The active project is %1, but it did not enqueue any kernels.").arg(strProjectType);
2009+
thisReason += QString("</li><li>The active project is %1, but it did not enqueue any kernels listed in the Profile Specific Kernels section").arg(strProjectType);
2010+
strProjectType.append(thisReason);
2011+
2012+
if (Util::IsHSAEnabled() && m_pCurrentProjectSettings->m_counterOptions.m_api == APIToTrace_OPENCL)
2013+
{
2014+
strExtraReason = QString("<li>Collecting OpenCL performance counters when running on the ROCm stack might not be supported.%1 </li>").arg(Util::ms_ENABLE_HSA_OPTION);
2015+
}
20022016
}
20032017

20042018
strError = QString("Unable to gather profile data. This error can occur for one of several reasons:<ul>");

CodeXL/Components/GpuProfiling/AMDTGpuProfiling/Session.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -592,45 +592,45 @@ const OccupancyTable& GPUSessionTreeItemData::LoadAndGetOccupancyTable()
592592

593593
void* pPtr;
594594
AtpDataHandlerFunc pAtpDataHandler_func = AtpUtils::Instance()->GetAtpDataHandlerFunc();
595-
IOccupancyFileInfoDataHandler* occupancyFileDataInfo = nullptr;
595+
IOccupancyFileInfoDataHandler* pOccupancyFileDataInfo = nullptr;
596596

597597
if (nullptr != pAtpDataHandler_func)
598598
{
599599
pAtpDataHandler_func(&pPtr);
600600
IAtpDataHandler* pApDataHandler = reinterpret_cast<IAtpDataHandler*>(pPtr);
601-
m_occupancyFile.fromStdString(std::string(m_pParentData->m_filePath.asString().asASCIICharArray()));
602601
std::string occupancyFile = m_occupancyFile.toStdString();
603602

604-
occupancyFileDataInfo = pApDataHandler->GetOccupancyFileInfoDataHandler(occupancyFile.c_str());
603+
pOccupancyFileDataInfo = pApDataHandler->GetOccupancyFileInfoDataHandler(occupancyFile.c_str());
605604

606-
if (nullptr != occupancyFileDataInfo)
605+
if (nullptr != pOccupancyFileDataInfo)
607606
{
608-
m_occupancyFileIsLoaded = occupancyFileDataInfo->ParseOccupancyFile(occupancyFile.c_str());
607+
if (!pOccupancyFileDataInfo->IsDataReady())
608+
{
609+
m_occupancyFileIsLoaded = pOccupancyFileDataInfo->ParseOccupancyFile(occupancyFile.c_str());
610+
}
609611
}
610-
611-
m_occupancyFileIsLoaded = occupancyFileDataInfo->ParseOccupancyFile(occupancyFile.c_str());
612612
}
613613

614-
if (m_occupancyFileIsLoaded)
614+
if (m_occupancyFileIsLoaded && nullptr != pOccupancyFileDataInfo)
615615
{
616-
osThreadId* osThreadIds;
616+
osThreadId* pOsThreadIds;
617617
unsigned int threadCount;
618-
occupancyFileDataInfo->GetOccupancyThreads(&osThreadIds, threadCount);
618+
pOccupancyFileDataInfo->GetOccupancyThreads(&pOsThreadIds, threadCount);
619619

620620
for (unsigned int i = 0; i < threadCount; i++)
621621
{
622622
const IOccupancyInfoDataHandler* occupancyInfo;
623623
unsigned int kernelCount;
624-
occupancyFileDataInfo->GetKernelCountByThreadId(osThreadIds[i], kernelCount);
624+
pOccupancyFileDataInfo->GetKernelCountByThreadId(pOsThreadIds[i], kernelCount);
625625
QList<const IOccupancyInfoDataHandler*> occupancyInfoList;
626626

627627
for (unsigned int j = 0; j < kernelCount; j++)
628628
{
629-
occupancyInfo = occupancyFileDataInfo->GetOccupancyInfoDataHandler(osThreadIds[i], j);
629+
occupancyInfo = pOccupancyFileDataInfo->GetOccupancyInfoDataHandler(pOsThreadIds[i], j);
630630
occupancyInfoList.push_back(occupancyInfo);
631631
}
632632

633-
m_occupancyTable.insert(osThreadIds[i], occupancyInfoList);
633+
m_occupancyTable.insert(pOsThreadIds[i], occupancyInfoList);
634634
}
635635
}
636636
}

CodeXL/Components/GpuProfiling/AMDTGpuProfiling/SessionControl.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,7 @@ const IOccupancyInfoDataHandler* SessionControl::GetOccupancyForRow(int rowIndex
528528
{
529529
// If the occupancy info doesn't match the one in the map, this means that the user sorted the table,
530530
// and the information in the map is no longer reflecting the correct line numbers:
531-
QString tempString;
532-
tempString.fromStdString(retVal->GetKernelName());
531+
QString tempString = QString::fromStdString(retVal->GetKernelName());
533532
if (!kernelName.startsWith(tempString))
534533
{
535534
QMap<int, const IOccupancyInfoDataHandler*>::const_iterator iter = m_rowOccupancyInfoMap.begin();
@@ -538,8 +537,7 @@ const IOccupancyInfoDataHandler* SessionControl::GetOccupancyForRow(int rowIndex
538537
{
539538
if ((*iter) != nullptr)
540539
{
541-
QString currentRowKernelName;
542-
currentRowKernelName.fromStdString((*iter)->GetKernelName());
540+
QString currentRowKernelName = QString::fromStdString((*iter)->GetKernelName());
543541
if (kernelName.startsWith(currentRowKernelName))
544542
{
545543
retVal = (*iter);

CodeXL/Components/GpuProfiling/AMDTGpuProfiling/SessionWindow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ void GPUSessionWindow::CellContentClicked(const QModelIndex& index)
373373
return;
374374
}
375375

376-
m_currentDisplayedOccupancyKernel = QString().fromStdString(occupancyInfo->GetKernelName());
376+
m_currentDisplayedOccupancyKernel = QString::fromStdString(occupancyInfo->GetKernelName());
377377
QTableView* pPcTable = m_pControl->GetTableView();
378378
int columnCount = pPcTable->model()->columnCount();
379379
int callIndexColIndex = -1;

0 commit comments

Comments
 (0)