mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:17:35 +00:00
Profiler: Make everything east-const :^)
This commit is contained in:
parent
cf8427b7b4
commit
ddccf451a9
16 changed files with 68 additions and 68 deletions
|
@ -17,7 +17,7 @@
|
|||
|
||||
namespace Profiler {
|
||||
|
||||
static const Gfx::Bitmap& heat_gradient()
|
||||
static Gfx::Bitmap const& heat_gradient()
|
||||
{
|
||||
static RefPtr<Gfx::Bitmap> bitmap;
|
||||
if (!bitmap) {
|
||||
|
@ -54,8 +54,8 @@ DisassemblyModel::DisassemblyModel(Profile& profile, ProfileNode& node)
|
|||
, m_node(node)
|
||||
{
|
||||
FlatPtr base_address = 0;
|
||||
const Debug::DebugInfo* debug_info;
|
||||
const ELF::Image* elf;
|
||||
Debug::DebugInfo const* debug_info;
|
||||
ELF::Image const* elf;
|
||||
if (auto maybe_kernel_base = Symbolication::kernel_base(); maybe_kernel_base.has_value() && m_node.address() >= *maybe_kernel_base) {
|
||||
if (!g_kernel_debuginfo_object.has_value())
|
||||
return;
|
||||
|
@ -107,7 +107,7 @@ DisassemblyModel::DisassemblyModel(Profile& profile, ProfileNode& node)
|
|||
auto view = symbol.value().raw_data().substring_view(symbol_offset_from_function_start);
|
||||
|
||||
X86::ELFSymbolProvider symbol_provider(*elf, base_address);
|
||||
X86::SimpleInstructionStream stream((const u8*)view.characters_without_null_termination(), view.length());
|
||||
X86::SimpleInstructionStream stream((u8 const*)view.characters_without_null_termination(), view.length());
|
||||
X86::Disassembler disassembler(stream);
|
||||
|
||||
size_t offset_into_symbol = 0;
|
||||
|
@ -143,7 +143,7 @@ DisassemblyModel::~DisassemblyModel()
|
|||
{
|
||||
}
|
||||
|
||||
int DisassemblyModel::row_count(const GUI::ModelIndex&) const
|
||||
int DisassemblyModel::row_count(GUI::ModelIndex const&) const
|
||||
{
|
||||
return m_instructions.size();
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ struct ColorPair {
|
|||
Color foreground;
|
||||
};
|
||||
|
||||
static Optional<ColorPair> color_pair_for(const InstructionData& insn)
|
||||
static Optional<ColorPair> color_pair_for(InstructionData const& insn)
|
||||
{
|
||||
if (insn.percent == 0)
|
||||
return {};
|
||||
|
@ -186,7 +186,7 @@ static Optional<ColorPair> color_pair_for(const InstructionData& insn)
|
|||
return ColorPair { background, foreground };
|
||||
}
|
||||
|
||||
GUI::Variant DisassemblyModel::data(const GUI::ModelIndex& index, GUI::ModelRole role) const
|
||||
GUI::Variant DisassemblyModel::data(GUI::ModelIndex const& index, GUI::ModelRole role) const
|
||||
{
|
||||
auto const& insn = m_instructions[index.row()];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue