diff --git a/src/ClientFlags/ClientFlags.cpp b/src/ClientFlags/ClientFlags.cpp index 0eef54d1d5e..4cbf65f48ab 100644 --- a/src/ClientFlags/ClientFlags.cpp +++ b/src/ClientFlags/ClientFlags.cpp @@ -88,9 +88,6 @@ ABSL_FLAG(bool, auto_frame_track, true, "Automatically add the default Frame Tra ABSL_FLAG(bool, time_range_selection, false, "Enable time range selection feature."); -ABSL_FLAG(bool, tracepoint_callstack_collection, false, - "Enable callstack gathering for tracepoints feature."); - ABSL_FLAG(bool, symbol_store_support, false, "Enable experimental symbol store support."); // Disables retrieving symbols from the instance. This is intended for symbol store e2e tests. diff --git a/src/ClientFlags/include/ClientFlags/ClientFlags.h b/src/ClientFlags/include/ClientFlags/ClientFlags.h index edbf50aeb5c..9a444ff12e4 100644 --- a/src/ClientFlags/include/ClientFlags/ClientFlags.h +++ b/src/ClientFlags/include/ClientFlags/ClientFlags.h @@ -73,9 +73,6 @@ ABSL_DECLARE_FLAG(bool, auto_frame_track); // Enables time range selection feature. ABSL_DECLARE_FLAG(bool, time_range_selection); -// Enables callstack gathering with tracepoints. -ABSL_DECLARE_FLAG(bool, tracepoint_callstack_collection); - // Enables experimental symbol store support. ABSL_DECLARE_FLAG(bool, symbol_store_support); diff --git a/src/OrbitQt/CaptureOptionsDialog.cpp b/src/OrbitQt/CaptureOptionsDialog.cpp index 0491211c672..985941c6f12 100644 --- a/src/OrbitQt/CaptureOptionsDialog.cpp +++ b/src/OrbitQt/CaptureOptionsDialog.cpp @@ -111,11 +111,6 @@ CaptureOptionsDialog::CaptureOptionsDialog(QWidget* parent) ui_->devModeGroupBox->hide(); ui_->wineNoneRadioButton->hide(); } - - if (!absl::GetFlag(FLAGS_tracepoint_callstack_collection)) { - ui_->threadStateChangeCallstackCollectionCheckBox->hide(); - ui_->threadStateChangeCallstackMaxCopyRawStackSizeWidget->hide(); - } } void CaptureOptionsDialog::SetEnableSampling(bool enable_sampling) { diff --git a/src/OrbitQt/orbitmainwindow.cpp b/src/OrbitQt/orbitmainwindow.cpp index c447abcbdb4..9688206c194 100644 --- a/src/OrbitQt/orbitmainwindow.cpp +++ b/src/OrbitQt/orbitmainwindow.cpp @@ -1169,35 +1169,28 @@ void OrbitMainWindow::LoadCaptureOptionsIntoApp() { app_->SetEnableApi(settings.value(kEnableApiSettingKey, true).toBool()); app_->SetEnableIntrospection(settings.value(kEnableIntrospectionSettingKey, false).toBool()); - if (absl::GetFlag(FLAGS_tracepoint_callstack_collection)) { - CaptureOptions::ThreadStateChangeCallStackCollection const - collect_callstack_on_thread_state_change = - static_cast( - settings - .value(kEnableCallStackCollectionOnThreadStateChanges, - orbit_qt::CaptureOptionsDialog:: - kThreadStateChangeCallStackCollectionDefaultValue) - .toInt()); - if (settings.value(kCollectThreadStatesSettingKey, false).toBool()) { - app_->SetThreadStateChangeCallstackCollection(collect_callstack_on_thread_state_change); - } else { - app_->SetThreadStateChangeCallstackCollection( - CaptureOptions::kThreadStateChangeCallStackCollectionUnspecified); - } - - uint16_t stack_dump_size = static_cast( - settings - .value( - kThreadStateChangeCallstackMaxCopyRawStackSizeSettingKey, - orbit_qt::CaptureOptionsDialog::kThreadStateChangeMaxCopyRawStackSizeDefaultValue) - .toUInt()); - app_->SetThreadStateChangeCallstackStackDumpSize(stack_dump_size); + CaptureOptions::ThreadStateChangeCallStackCollection const + collect_callstack_on_thread_state_change = static_cast< + CaptureOptions::ThreadStateChangeCallStackCollection>( + settings + .value( + kEnableCallStackCollectionOnThreadStateChanges, + orbit_qt::CaptureOptionsDialog::kThreadStateChangeCallStackCollectionDefaultValue) + .toInt()); + if (settings.value(kCollectThreadStatesSettingKey, false).toBool()) { + app_->SetThreadStateChangeCallstackCollection(collect_callstack_on_thread_state_change); } else { app_->SetThreadStateChangeCallstackCollection( CaptureOptions::kThreadStateChangeCallStackCollectionUnspecified); - - app_->SetThreadStateChangeCallstackStackDumpSize(std::numeric_limits::max()); } + + uint16_t thread_state_change_stack_dump_size = static_cast( + settings + .value(kThreadStateChangeCallstackMaxCopyRawStackSizeSettingKey, + orbit_qt::CaptureOptionsDialog::kThreadStateChangeMaxCopyRawStackSizeDefaultValue) + .toUInt()); + app_->SetThreadStateChangeCallstackStackDumpSize(thread_state_change_stack_dump_size); + DynamicInstrumentationMethod instrumentation_method = static_cast( settings .value(kDynamicInstrumentationMethodSettingKey, @@ -1337,25 +1330,22 @@ void OrbitMainWindow::on_actionCaptureOptions_triggered() { QVariant::fromValue(orbit_qt::CaptureOptionsDialog::kLocalMarkerDepthDefaultValue)) .toULongLong()); - if (absl::GetFlag(FLAGS_tracepoint_callstack_collection)) { - CaptureOptions::ThreadStateChangeCallStackCollection collect_callstack_on_thread_state_change = - static_cast( - settings - .value(kEnableCallStackCollectionOnThreadStateChanges, - orbit_qt::CaptureOptionsDialog:: - kThreadStateChangeCallStackCollectionDefaultValue) - .toInt()); - dialog.SetEnableCallStackCollectionOnThreadStateChanges( - collect_callstack_on_thread_state_change == - CaptureOptions::kThreadStateChangeCallStackCollection); - - dialog.SetThreadStateChangeCallstackMaxCopyRawStackSize(static_cast( - settings - .value( - kThreadStateChangeCallstackMaxCopyRawStackSizeSettingKey, - orbit_qt::CaptureOptionsDialog::kThreadStateChangeMaxCopyRawStackSizeDefaultValue) - .toUInt())); - } + CaptureOptions::ThreadStateChangeCallStackCollection collect_callstack_on_thread_state_change = + static_cast( + settings + .value( + kEnableCallStackCollectionOnThreadStateChanges, + orbit_qt::CaptureOptionsDialog::kThreadStateChangeCallStackCollectionDefaultValue) + .toInt()); + dialog.SetEnableCallStackCollectionOnThreadStateChanges( + collect_callstack_on_thread_state_change == + CaptureOptions::kThreadStateChangeCallStackCollection); + + dialog.SetThreadStateChangeCallstackMaxCopyRawStackSize(static_cast( + settings + .value(kThreadStateChangeCallstackMaxCopyRawStackSizeSettingKey, + orbit_qt::CaptureOptionsDialog::kThreadStateChangeMaxCopyRawStackSizeDefaultValue) + .toUInt())); int result = dialog.exec(); if (result != QDialog::Accepted) { @@ -1387,15 +1377,14 @@ void OrbitMainWindow::on_actionCaptureOptions_triggered() { dialog.GetLimitLocalMarkerDepthPerCommandBuffer()); settings.setValue(kMaxLocalMarkerDepthPerCommandBufferSettingsKey, QString::number(dialog.GetMaxLocalMarkerDepthPerCommandBuffer())); - if (absl::GetFlag(FLAGS_tracepoint_callstack_collection)) { - settings.setValue( - kEnableCallStackCollectionOnThreadStateChanges, - static_cast(dialog.GetEnableCallStackCollectionOnThreadStateChanges() - ? CaptureOptions::kThreadStateChangeCallStackCollection - : CaptureOptions::kNoThreadStateChangeCallStackCollection)); - settings.setValue(kThreadStateChangeCallstackMaxCopyRawStackSizeSettingKey, - static_cast(dialog.GetThreadStateChangeCallstackMaxCopyRawStackSize())); - } + settings.setValue( + kEnableCallStackCollectionOnThreadStateChanges, + static_cast(dialog.GetEnableCallStackCollectionOnThreadStateChanges() + ? CaptureOptions::kThreadStateChangeCallStackCollection + : CaptureOptions::kNoThreadStateChangeCallStackCollection)); + settings.setValue(kThreadStateChangeCallstackMaxCopyRawStackSizeSettingKey, + static_cast(dialog.GetThreadStateChangeCallstackMaxCopyRawStackSize())); + LoadCaptureOptionsIntoApp(); }