VirtualBox

Changeset 12546 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Sep 17, 2008 5:11:15 PM (16 years ago)
Author:
vboxsync
Message:

PerfAPI: Improved Linux collector

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/Performance.h

    r12513 r12546  
    8686
    8787        CollectorHints() : mHostFlags(COLLECT_NONE) {}
    88         void collectHostCpuLoad() { mHostFlags |= COLLECT_CPU_LOAD; }
    89         void collectHostRamUsage() { mHostFlags |= COLLECT_RAM_USAGE; }
     88        void collectHostCpuLoad()
     89            { mHostFlags |= COLLECT_CPU_LOAD; }
     90        void collectHostRamUsage()
     91            { mHostFlags |= COLLECT_RAM_USAGE; }
    9092        void collectProcessCpuLoad(RTPROCESS process)
    91         {
    92             findProcess(process).second |= COLLECT_CPU_LOAD;
    93         }
     93            { findProcess(process).second |= COLLECT_CPU_LOAD; }
    9494        void collectProcessRamUsage(RTPROCESS process)
    95         {
    96             findProcess(process).second |= COLLECT_RAM_USAGE;
    97         }
    98         bool isHostCpuLoadCollected() { return (mHostFlags & COLLECT_CPU_LOAD) != 0; }
    99         bool isHostRamUsageCollected() { return (mHostFlags & COLLECT_RAM_USAGE) != 0; }
     95            { findProcess(process).second |= COLLECT_RAM_USAGE; }
     96        bool isHostCpuLoadCollected() const
     97            { return (mHostFlags & COLLECT_CPU_LOAD) != 0; }
     98        bool isHostRamUsageCollected() const
     99            { return (mHostFlags & COLLECT_RAM_USAGE) != 0; }
    100100        bool isProcessCpuLoadCollected(RTPROCESS process)
    101         {
    102             return (findProcess(process).second & COLLECT_CPU_LOAD) != 0;
    103         }
     101            { return (findProcess(process).second & COLLECT_CPU_LOAD) != 0; }
    104102        bool isProcessRamUsageCollected(RTPROCESS process)
    105         {
    106             return (findProcess(process).second & COLLECT_RAM_USAGE) != 0;
    107         }
     103            { return (findProcess(process).second & COLLECT_RAM_USAGE) != 0; }
    108104        void getProcesses(std::vector<RTPROCESS>& processes) const
    109105        {
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