summaryrefslogtreecommitdiff
path: root/Userland/DevTools/Profiler
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-02-23 20:42:32 +0100
committerAndreas Kling <kling@serenityos.org>2021-02-23 20:56:54 +0100
commit5d180d1f996ead27f9c5cb3db7f91e293de34d9d (patch)
treee881854dac5d749518562970d6194a0ef65736ec /Userland/DevTools/Profiler
parentb33a6a443e700cd80325d312f21c985b0687bb97 (diff)
downloadserenity-5d180d1f996ead27f9c5cb3db7f91e293de34d9d.zip
Everywhere: Rename ASSERT => VERIFY
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
Diffstat (limited to 'Userland/DevTools/Profiler')
-rw-r--r--Userland/DevTools/Profiler/DisassemblyModel.cpp8
-rw-r--r--Userland/DevTools/Profiler/Profile.h2
-rw-r--r--Userland/DevTools/Profiler/ProfileModel.cpp6
3 files changed, 8 insertions, 8 deletions
diff --git a/Userland/DevTools/Profiler/DisassemblyModel.cpp b/Userland/DevTools/Profiler/DisassemblyModel.cpp
index 4195f103cd..c9bf70ab2c 100644
--- a/Userland/DevTools/Profiler/DisassemblyModel.cpp
+++ b/Userland/DevTools/Profiler/DisassemblyModel.cpp
@@ -47,7 +47,7 @@ static const Gfx::Bitmap& heat_gradient()
static Color color_for_percent(int percent)
{
- ASSERT(percent >= 0 && percent <= 100);
+ VERIFY(percent >= 0 && percent <= 100);
return heat_gradient().get_pixel(percent, 0);
}
@@ -77,14 +77,14 @@ DisassemblyModel::DisassemblyModel(Profile& profile, ProfileNode& node)
base_address = library_data->base;
}
- ASSERT(elf != nullptr);
+ VERIFY(elf != nullptr);
auto symbol = elf->find_symbol(node.address() - base_address);
if (!symbol.has_value()) {
dbgln("DisassemblyModel: symbol not found");
return;
}
- ASSERT(symbol.has_value());
+ VERIFY(symbol.has_value());
auto view = symbol.value().raw_data();
@@ -132,7 +132,7 @@ String DisassemblyModel::column_name(int column) const
case Column::Disassembly:
return "Disassembly";
default:
- ASSERT_NOT_REACHED();
+ VERIFY_NOT_REACHED();
return {};
}
}
diff --git a/Userland/DevTools/Profiler/Profile.h b/Userland/DevTools/Profiler/Profile.h
index 0acf3e917f..18a93c75a9 100644
--- a/Userland/DevTools/Profiler/Profile.h
+++ b/Userland/DevTools/Profiler/Profile.h
@@ -72,7 +72,7 @@ public:
{
if (child.m_parent == this)
return;
- ASSERT(!child.m_parent);
+ VERIFY(!child.m_parent);
child.m_parent = this;
m_children.append(child);
}
diff --git a/Userland/DevTools/Profiler/ProfileModel.cpp b/Userland/DevTools/Profiler/ProfileModel.cpp
index caf1819446..d9798069f1 100644
--- a/Userland/DevTools/Profiler/ProfileModel.cpp
+++ b/Userland/DevTools/Profiler/ProfileModel.cpp
@@ -67,7 +67,7 @@ GUI::ModelIndex ProfileModel::parent_index(const GUI::ModelIndex& index) const
return create_index(row, index.column(), node.parent());
}
}
- ASSERT_NOT_REACHED();
+ VERIFY_NOT_REACHED();
return {};
}
@@ -76,7 +76,7 @@ GUI::ModelIndex ProfileModel::parent_index(const GUI::ModelIndex& index) const
return create_index(row, index.column(), node.parent());
}
- ASSERT_NOT_REACHED();
+ VERIFY_NOT_REACHED();
return {};
}
@@ -103,7 +103,7 @@ String ProfileModel::column_name(int column) const
case Column::StackFrame:
return "Stack Frame";
default:
- ASSERT_NOT_REACHED();
+ VERIFY_NOT_REACHED();
return {};
}
}