File indexing completed on 2024-04-21 04:36:01
0001 /* This file is part of KDevelop 0002 Copyright 2017 Anton Anikin <anton@anikin.xyz> 0003 0004 This program is free software; you can redistribute it and/or 0005 modify it under the terms of the GNU General Public 0006 License as published by the Free Software Foundation; either 0007 version 2 of the License, or (at your option) any later version. 0008 0009 This program is distributed in the hope that it will be useful, 0010 but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0012 General Public License for more details. 0013 0014 You should have received a copy of the GNU General Public License 0015 along with this program; see the file COPYING. If not, write to 0016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0017 Boston, MA 02110-1301, USA. 0018 */ 0019 0020 #include "massif_config.h" 0021 0022 #include "globalsettings.h" 0023 #include "massif_tool.h" 0024 0025 namespace Valgrind 0026 { 0027 0028 MassifConfig::MassifConfig() 0029 : Config(MassifTool::self()->id()) 0030 { 0031 auto itemInt = addCmdItemInt(QStringLiteral("snapshotTreeDepth"), m_snapshotTreeDepth, 30, QStringLiteral("depth")); 0032 itemInt->setMinValue(1); 0033 itemInt->setMaxValue(3000); 0034 0035 auto itemDouble = addCmdItemDouble(QStringLiteral("threshold"), m_threshold, 1.0, QStringLiteral("threshold")); 0036 itemDouble->setMinValue(1.0); 0037 itemDouble->setMaxValue(100.0); 0038 0039 itemDouble = addCmdItemDouble(QStringLiteral("peakInaccuracy"), m_peakInaccuracy, 1.0, QStringLiteral("peak-inaccuracy")); 0040 itemDouble->setMinValue(0.0); 0041 itemDouble->setMaxValue(100.0); 0042 0043 itemInt = addCmdItemInt(QStringLiteral("maximumSnapshots"), m_maximumSnapshots, 100, QStringLiteral("max-snapshots")); 0044 itemInt->setMinValue(1); 0045 itemInt->setMaxValue(10000); 0046 0047 itemInt = addCmdItemInt(QStringLiteral("detailedSnapshotsFrequency"), m_detailedSnapshotsFrequency, 10, QStringLiteral("detailed-freq")); 0048 itemInt->setMinValue(1); 0049 itemInt->setMaxValue(10000); 0050 0051 addCmdItemString(QStringLiteral("timeUnit"), m_timeUnit, QStringLiteral("i"), QStringLiteral("time-unit")); 0052 0053 addCmdItemBool(QStringLiteral("profileHeap"), m_profileHeap, true, QStringLiteral("heap")); 0054 addCmdItemBool(QStringLiteral("profileStack"), m_profileStack, false, QStringLiteral("stacks")); 0055 addCmdItemBool(QStringLiteral("pagesAsHeap"), m_pagesAsHeap, false, QStringLiteral("pages-as-heap")); 0056 0057 addItemBool(QStringLiteral("launchVisualizer"), m_launchVisualizer, false); 0058 } 0059 0060 QString MassifConfig::visualizerExecutablePath() 0061 { 0062 return KDevelop::Path(GlobalSettings::massifVisualizerExecutablePath()).toLocalFile(); 0063 } 0064 0065 }