Skip to content

Commit

Permalink
Fix for Clang 10 unknown data
Browse files Browse the repository at this point in the history
  • Loading branch information
Viladoman committed Aug 22, 2020
1 parent b77192f commit 7e85c3f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions SeeProfiler/main/src/collector.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ function CreateObjectData(file,events,globals)
var element = events[i];
if (element.tid == 0 && element.name != 'process_name')
{
var node = {label: element.args.detail, type: Defs.NodeNatureFromString(element.name), start: element.ts, duration: element.dur, maxDepth: 0, children: []};
var name = element.args? element.args.detail : element.name;
var node = {label: name, type: Defs.NodeNatureFromString(element.name), start: element.ts, duration: element.dur, maxDepth: 0, children: []};
if (node.type == Defs.NodeNature.SOURCE){ node.label = path.basename(node.label).toLowerCase(); }
if (node.type == Defs.NodeNature.EXECUTECOMPILER){ node.label = objectDB.info.label; }
nodes.push(node);
Expand Down Expand Up @@ -112,7 +113,8 @@ function CreateTreeRoot(file,events)
var element = events[i];
if (element.tid == 0 && element.name != 'process_name')
{
var node = {label: element.args.detail, type: Defs.NodeNatureFromString(element.name), start: element.ts, duration: element.dur, maxDepth: 0, children: []};
var name = element.args? element.args.detail : element.name;
var node = {label: name, type: Defs.NodeNatureFromString(element.name), start: element.ts, duration: element.dur, maxDepth: 0, children: []};
if (node.type == Defs.NodeNature.SOURCE){ node.label = path.basename(node.label); }
if (node.type == Defs.NodeNature.EXECUTECOMPILER){ node.label = baseLabel; }
nodes.push(node);
Expand Down

0 comments on commit 7e85c3f

Please sign in to comment.