VirtualBox

Changeset 103461 in vbox for trunk/src/VBox/Debugger


Ignore:
Timestamp:
Feb 19, 2024 11:24:33 PM (12 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
161795
Message:

VBoxDbg: Added some simple sub-tree filtering to the statistics viewer. [fix] bugref:10376

Location:
trunk/src/VBox/Debugger
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Debugger/VBoxDbg.cpp

    r98103 r103461  
    220220 *
    221221 * @returns VBox status code.
    222  * @param   pGui        The instance returned by DBGGuiCreate().
    223  * @param   pszFilter   Filter pattern.
    224  * @param   pszExpand   Expand pattern.
    225  */
    226 DBGDECL(int) DBGGuiShowStatistics(PDBGGUI pGui, const char *pszFilter, const char *pszExpand)
     222 * @param   pGui            The instance returned by DBGGuiCreate().
     223 * @param   pszFilter       Filter pattern.
     224 * @param   pszExpand       Expand pattern.
     225 * @param   pszAdvFilter    Advanced filter configuration string (min/max/regexp
     226 *                          on sub-trees).
     227 */
     228DBGDECL(int) DBGGuiShowStatistics(PDBGGUI pGui, const char *pszFilter, const char *pszExpand, const char *pszAdvFilter)
    227229{
    228230    AssertReturn(pGui, VERR_INVALID_PARAMETER);
    229231    AssertMsgReturn(pGui->u32Magic == DBGGUI_MAGIC, ("u32Magic=%#x\n", pGui->u32Magic), VERR_INVALID_PARAMETER);
    230     return pGui->pVBoxDbgGui->showStatistics(pszFilter, pszExpand);
     232    return pGui->pVBoxDbgGui->showStatistics(pszFilter, pszExpand, pszAdvFilter);
    231233}
    232234
  • trunk/src/VBox/Debugger/VBoxDbgGui.cpp

    r101554 r103461  
    182182
    183183int
    184 VBoxDbgGui::showStatistics(const char *pszFilter, const char *pszExpand)
     184VBoxDbgGui::showStatistics(const char *pszFilter, const char *pszExpand, const char *pszAdvFilter)
    185185{
    186186    if (!m_pDbgStats)
     
    189189                                       pszFilter && *pszFilter ? pszFilter :  "*",
    190190                                       pszExpand && *pszExpand ? pszExpand : NULL,
     191                                       pszAdvFilter && *pszAdvFilter ? pszAdvFilter : NULL,
    191192                                       2, m_pParent);
    192193        connect(m_pDbgStats, SIGNAL(destroyed(QObject *)), this, SLOT(notifyChildDestroyed(QObject *)));
  • trunk/src/VBox/Debugger/VBoxDbgGui.h

    r101107 r103461  
    103103     *
    104104     * @returns VBox status code.
    105      * @param   pszFilter   Filter pattern.
    106      * @param   pszExpand   Expand pattern.
    107      */
    108     int showStatistics(const char *pszFilter, const char *pszExpand);
     105     * @param   pszFilter       Filter pattern.
     106     * @param   pszExpand       Expand pattern.
     107     * @param   pszAdvFilter    Advanced filter configuration string (min/max/regexp
     108     *                          on sub-trees).
     109     */
     110    int showStatistics(const char *pszFilter, const char *pszExpand, const char *pszAdvFilter);
    109111
    110112    /**
  • trunk/src/VBox/Debugger/VBoxDbgStatsQt.cpp

    r103460 r103461  
    719719     * Constructor.
    720720     *
     721     * @param   a_pszAdvFilter  Configuration string from the command line or such.
    721722     * @param   a_pParent       The parent object.
    722723     */
    723     VBoxDbgStatsSortFileProxyModel(QObject *a_pParent);
     724    VBoxDbgStatsSortFileProxyModel(const char *a_pszAdvFilter, QObject *a_pParent);
    724725
    725726    /** Destructor */
    726727    virtual ~VBoxDbgStatsSortFileProxyModel()
    727728    {}
     729
     730    /** Gets the unused-rows visibility status. */
     731    bool isShowingUnusedRows() const { return m_fShowUnusedRows; }
    728732
    729733    /** Sets whether or not to show unused rows (all zeros). */
     
    38793883    QModelIndex Idx = m_pCurMenu ? m_CurIndex : currentIndex();
    38803884    if (Idx.isValid())
    3881         Idx == myGetRootIndex();
     3885        Idx = myGetRootIndex();
    38823886    Idx = m_pProxyModel->mapToSource(Idx);
    38833887    PDBGGUISTATSNODE pNode = m_pVBoxModel->nodeFromIndex(Idx);
     
    40874091
    40884092VBoxDbgStats::VBoxDbgStats(VBoxDbgGui *a_pDbgGui, const char *pszFilter /*= NULL*/, const char *pszExpand /*= NULL*/,
    4089                            unsigned uRefreshRate/* = 0*/, QWidget *pParent/* = NULL*/)
     4093                           const char *pszAdvFilter /*= NULL*/, unsigned uRefreshRate/* = 0*/, QWidget *pParent/* = NULL*/)
    40904094    : VBoxDbgBaseWindow(a_pDbgGui, pParent, "Statistics")
    40914095    , m_PatStr(pszFilter), m_pPatCB(NULL), m_uRefreshRate(0), m_pTimer(NULL), m_pView(NULL)
     
    41494153    VBoxDbgStatsSortFileProxyModel *pProxyModel = new VBoxDbgStatsSortFileProxyModel(this);
    41504154    m_pView = new VBoxDbgStatsView(a_pDbgGui, pModel, pProxyModel, this);
     4155    pCheckBox->setCheckState(pProxyModel->isShowingUnusedRows() ? Qt::Checked : Qt::Unchecked)
    41514156#else
    41524157    m_pView = new VBoxDbgStatsView(a_pDbgGui, pModel, NULL, this);
  • trunk/src/VBox/Debugger/VBoxDbgStatsQt.h

    r103460 r103461  
    244244     * @param   pszExpand       Initial expansion pattern. NULL means nothing is
    245245     *                          expanded.
     246     * @param   pszAdvFilter    Advanced filter configuration string (min/max/regexp
     247     *                          on sub-trees).
    246248     * @param   uRefreshRate    The refresh rate. 0 means not to refresh and is the default.
    247249     * @param   pParent         Parent widget.
    248250     */
    249251    VBoxDbgStats(VBoxDbgGui *a_pDbgGui, const char *pszFilter = NULL, const char *pszExpand = NULL,
    250                  unsigned uRefreshRate = 0, QWidget *pParent = NULL);
     252                 const char *pszAdvFilter = NULL, unsigned uRefreshRate = 0, QWidget *pParent = NULL);
    251253
    252254    /** Destructor. */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette