diff options
Diffstat (limited to 'app/perfunwind.cpp')
-rw-r--r-- | app/perfunwind.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/app/perfunwind.cpp b/app/perfunwind.cpp index 7823791..e06a3ac 100644 --- a/app/perfunwind.cpp +++ b/app/perfunwind.cpp @@ -203,7 +203,9 @@ void PerfUnwind::attr(const PerfRecordAttr &attr) void PerfUnwind::addAttributes(const PerfEventAttributes &attributes, const QByteArray &name, const QList<quint64> &ids) { - const qint32 internalId = resolveAttributes(attributes, name); + const qint32 internalId = m_attributes.size(); + m_attributes.append(attributes); + sendAttributes(internalId, attributes, name); if (ids.isEmpty()) { // If we only get one attribute, it doesn't have an ID. @@ -216,16 +218,6 @@ void PerfUnwind::addAttributes(const PerfEventAttributes &attributes, const QByt } } -qint32 PerfUnwind::resolveAttributes(const PerfEventAttributes &attributes, const QByteArray &name) -{ - auto it = m_attributes.find(attributes); - if (it == m_attributes.end()) { - it = m_attributes.insert(attributes, m_attributes.size()); - sendAttributes(it.value(), attributes, name); - } - return it.value(); -} - void PerfUnwind::sendAttributes(qint32 id, const PerfEventAttributes &attributes, const QByteArray &name) { const qint32 attrNameId = resolveString(name); |