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

Commit f0e63c1

Browse files
committed
Fix for tool tip of demangled kernel names
1 parent 00f55df commit f0e63c1

1 file changed

Lines changed: 29 additions & 1 deletion

File tree

CodeXL/Components/GpuProfiling/AMDTGpuProfiling/HSATimelineItems.cpp

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,35 @@ HSADispatchTimelineItem::HSADispatchTimelineItem(quint64 startTime, quint64 endT
2525

2626
void HSADispatchTimelineItem::tooltipItems(acTimelineItemToolTip& tooltip) const
2727
{
28-
tooltip.add(tr("Name"), m_strText);
28+
std::string KernelNameString = m_strText.toStdString();
29+
std::string tempString;
30+
31+
for (std::string::const_iterator it = KernelNameString.begin(); it != KernelNameString.end(); ++it)
32+
{
33+
if ((*it) == '<')
34+
{
35+
tempString.append("&lt;");
36+
}
37+
else if ((*it) == '>')
38+
{
39+
tempString.append("&gt;");
40+
}
41+
else if ((*it) == '#')
42+
{
43+
tempString.append("&#35;");
44+
}
45+
else if ((*it) == '&')
46+
{
47+
tempString.append("&amp;");
48+
}
49+
else
50+
{
51+
tempString.push_back(*it);
52+
}
53+
}
54+
55+
QString kernelName(QString::fromStdString(tempString));
56+
tooltip.add(tr("Name"), kernelName);
2957
tooltip.add(tr("Device"), m_strDeviceType);
3058

3159
acTimeline* timeline = m_pParentBranch->parentTimeline();

0 commit comments

Comments
 (0)