summaryrefslogtreecommitdiff
path: root/Userland/DevTools/Profiler/main.cpp
diff options
context:
space:
mode:
authorStephan Unverwerth <s.unverwerth@serenityos.org>2021-12-28 13:35:08 +0100
committerAndreas Kling <kling@serenityos.org>2021-12-28 23:17:24 +0100
commitddccf451a96ca54ce110cf25900d98269d397e2d (patch)
treebd3eb186c055d70dbecf759996430806b8f20e49 /Userland/DevTools/Profiler/main.cpp
parentcf8427b7b46798f7e26929bb05dc5ffa33c359a5 (diff)
downloadserenity-ddccf451a96ca54ce110cf25900d98269d397e2d.zip
Profiler: Make everything east-const :^)
Diffstat (limited to 'Userland/DevTools/Profiler/main.cpp')
-rw-r--r--Userland/DevTools/Profiler/main.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Userland/DevTools/Profiler/main.cpp b/Userland/DevTools/Profiler/main.cpp
index bb34effc92..59ace5eee7 100644
--- a/Userland/DevTools/Profiler/main.cpp
+++ b/Userland/DevTools/Profiler/main.cpp
@@ -46,7 +46,7 @@ static bool generate_profile(pid_t& pid);
ErrorOr<int> serenity_main(Main::Arguments arguments)
{
int pid = 0;
- const char* perfcore_file_arg = nullptr;
+ char const* perfcore_file_arg = nullptr;
Core::ArgsParser args_parser;
args_parser.add_option(pid, "PID to profile", "pid", 'p', "PID");
args_parser.add_positional_argument(perfcore_file_arg, "Path of perfcore file", "perfcore-file", Core::ArgsParser::Required::No);
@@ -190,7 +190,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto individual_sample_view = TRY(samples_splitter->try_add<GUI::TableView>());
samples_table_view->on_selection_change = [&] {
- const auto& index = samples_table_view->selection().first();
+ auto const& index = samples_table_view->selection().first();
auto model = IndividualSampleModel::create(*profile, index.data(GUI::ModelRole::Custom).to_integer<size_t>());
individual_sample_view->set_model(move(model));
};
@@ -205,7 +205,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto individual_signpost_view = TRY(signposts_splitter->try_add<GUI::TableView>());
signposts_table_view->on_selection_change = [&] {
- const auto& index = signposts_table_view->selection().first();
+ auto const& index = signposts_table_view->selection().first();
auto model = IndividualSampleModel::create(*profile, index.data(GUI::ModelRole::Custom).to_integer<size_t>());
individual_signpost_view->set_model(move(model));
};
@@ -216,9 +216,9 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto flamegraph_view = TRY(flamegraph_tab->try_add<FlameGraphView>(profile->model(), ProfileModel::Column::StackFrame, ProfileModel::Column::SampleCount));
- const u64 start_of_trace = profile->first_timestamp();
- const u64 end_of_trace = start_of_trace + profile->length_in_ms();
- const auto clamp_timestamp = [start_of_trace, end_of_trace](u64 timestamp) -> u64 {
+ u64 const start_of_trace = profile->first_timestamp();
+ u64 const end_of_trace = start_of_trace + profile->length_in_ms();
+ auto const clamp_timestamp = [start_of_trace, end_of_trace](u64 timestamp) -> u64 {
return min(end_of_trace, max(timestamp, start_of_trace));
};
@@ -291,7 +291,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
return app->exec();
}
-static bool prompt_to_stop_profiling(pid_t pid, const String& process_name)
+static bool prompt_to_stop_profiling(pid_t pid, String const& process_name)
{
auto window = GUI::Window::construct();
window->set_title(String::formatted("Profiling {}({})", process_name, pid));