We used to have menu actions for applying negative ID filters (do not show) for PIDs and CPU IDs. At some point we decided to remove all menu actions for negative filters in order to avoid users being confused by the possible unexpected behavior in the case when both positive (show only) and negative filters are set. However we kept the corresponding private methods, just in case we want to restore the menu actions in the future. We can now finally remove those methods, because in the following patch the logic will be optimized to automatically decide whether is more efficient to use positive or negative filter. Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@xxxxxxxxx> --- kernel-shark/src/KsMainWindow.cpp | 69 ------------------------------- kernel-shark/src/KsMainWindow.hpp | 4 -- 2 files changed, 73 deletions(-) diff --git a/kernel-shark/src/KsMainWindow.cpp b/kernel-shark/src/KsMainWindow.cpp index a5a399c..9b5fc2d 100644 --- a/kernel-shark/src/KsMainWindow.cpp +++ b/kernel-shark/src/KsMainWindow.cpp @@ -669,41 +669,6 @@ void KsMainWindow::_showTasks() dialog->show(); } -void KsMainWindow::_hideTasks() -{ - kshark_context *kshark_ctx(nullptr); - KsCheckBoxWidget *tasks_cbd; - KsCheckBoxDialog *dialog; - - if (!kshark_instance(&kshark_ctx)) - return; - - tasks_cbd = new KsTasksCheckBoxWidget(_data.tep(), false, this); - dialog = new KsCheckBoxDialog(tasks_cbd, this); - - if (!kshark_ctx->hide_task_filter || - !kshark_ctx->hide_task_filter->count) { - tasks_cbd->setDefault(false); - } else { - QVector<int> pids = KsUtils::getPidList(); - int nPids = pids.count(); - QVector<bool> v(nPids, false); - - for (int i = 0; i < nPids; ++i) { - if (tracecmd_filter_id_find(kshark_ctx->hide_task_filter, - pids[i])) - v[i] = true; - } - - tasks_cbd->set(v); - } - - connect(dialog, &KsCheckBoxDialog::apply, - &_data, &KsDataStore::applyNegTaskFilter); - - dialog->show(); -} - void KsMainWindow::_showCPUs() { kshark_context *kshark_ctx(nullptr); @@ -737,40 +702,6 @@ void KsMainWindow::_showCPUs() dialog->show(); } -void KsMainWindow::_hideCPUs() -{ - kshark_context *kshark_ctx(nullptr); - KsCheckBoxWidget *cpu_cbd; - KsCheckBoxDialog *dialog; - - if (!kshark_instance(&kshark_ctx)) - return; - - cpu_cbd = new KsCPUCheckBoxWidget(_data.tep(), this); - dialog = new KsCheckBoxDialog(cpu_cbd, this); - - if (!kshark_ctx->hide_cpu_filter || - !kshark_ctx->hide_cpu_filter->count) { - cpu_cbd->setDefault(false); - } else { - int nCPUs = tep_get_cpus(_data.tep()); - QVector<bool> v(nCPUs, false); - - for (int i = 0; i < nCPUs; ++i) { - if (tracecmd_filter_id_find(kshark_ctx->hide_cpu_filter, - i)) - v[i] = true; - } - - cpu_cbd->set(v); - } - - connect(dialog, &KsCheckBoxDialog::apply, - &_data, &KsDataStore::applyNegCPUFilter); - - dialog->show(); -} - void KsMainWindow::_advancedFiltering() { KsAdvFilteringDialog *dialog; diff --git a/kernel-shark/src/KsMainWindow.hpp b/kernel-shark/src/KsMainWindow.hpp index eef4f96..59030e4 100644 --- a/kernel-shark/src/KsMainWindow.hpp +++ b/kernel-shark/src/KsMainWindow.hpp @@ -181,12 +181,8 @@ private: void _showTasks(); - void _hideTasks(); - void _showCPUs(); - void _hideCPUs(); - void _advancedFiltering(); void _clearFilters(); -- 2.20.1