Skip to content

Commit

Permalink
reordered checks in brushSystem
Browse files Browse the repository at this point in the history
  • Loading branch information
GitMensch authored and milianw committed Nov 1, 2023
1 parent ea54cbf commit 89c3808
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/flamegraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,13 +379,10 @@ QBrush brushSystem(const Data::Symbol& symbol)
static const auto user = QBrush(QColor(200, 200, 0, 125));
static const auto unknown = QBrush(QColor(50, 50, 50, 125));

// I have seen [ only on kernel calls
// remark lievenhey: I have seen [ only on kernel calls
if (symbol.path.isEmpty() || symbol.path.startsWith(QLatin1Char('['))) {
return unknown;
} else if (isSystemPath(symbol.path)) {
if (isUserPath(symbol.path)) {
return user;
}
} else if (!isUserPath(symbol.path) && isSystemPath(symbol.path)) {
return system;
}
return user;
Expand Down

0 comments on commit 89c3808

Please sign in to comment.