VirtualBox

Changeset 28507 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Apr 20, 2010 8:43:15 AM (15 years ago)
Author:
vboxsync
Message:

Guest statistics: fixed reporting of Solaris guest CPU information for each guest CPU

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceStats.cpp

    r28506 r28507  
    283283        rc = VbglR3StatReport(&req);
    284284        if (RT_SUCCESS(rc))
    285             VBoxServiceVerbose(3, "VBoxStatsReportStatistics: new statistics reported successfully!\n");
     285            VBoxServiceVerbose(3, "VBoxStatsReportStatistics: new statistics (CPU %u) reported successfully!\n", i);
    286286        else
    287287            VBoxServiceVerbose(3, "VBoxStatsReportStatistics: DeviceIoControl (stats report) failed with %d\n", GetLastError());
     
    422422                    rc = VbglR3StatReport(&req);
    423423                    if (RT_SUCCESS(rc))
    424                         VBoxServiceVerbose(3, "VBoxStatsReportStatistics: new statistics reported successfully!\n");
     424                        VBoxServiceVerbose(3, "VBoxStatsReportStatistics: new statistics (CPU %u) reported successfully!\n", u32CpuId);
    425425                    else
    426426                        VBoxServiceVerbose(3, "VBoxStatsReportStatistics: stats report failed with rc=%Rrc\n", rc);
     
    532532        kstat_t *pStatNode = NULL;
    533533        uint32_t cCPUs = 0;
     534        bool fCpuInfoAvail = false;
    534535        for (pStatNode = pStatKern->kc_chain; pStatNode != NULL; pStatNode = pStatNode->ks_next)
    535536        {
     
    562563                                           |  VBOX_GUEST_STAT_CPU_LOAD_KERNEL \
    563564                                           |  VBOX_GUEST_STAT_CPU_LOAD_USER;
    564 
     565                fCpuInfoAvail = true;
     566
     567                rc = VbglR3StatReport(&req);
     568                if (RT_SUCCESS(rc))
     569                    VBoxServiceVerbose(3, "VBoxStatsReportStatistics: new statistics (CPU %u) reported successfully!\n", cCpus);
     570                else
     571                    VBoxServiceVerbose(3, "VBoxStatsReportStatistics: stats report failed with rc=%Rrc\n", rc);
    565572                cCPUs++;
    566573            }
     
    570577         * Report whatever statistics were collected.
    571578         */
    572         rc = VbglR3StatReport(&req);
    573         if (RT_SUCCESS(rc))
    574             VBoxServiceVerbose(3, "VBoxStatsReportStatistics: new statistics reported successfully!\n");
    575         else
    576             VBoxServiceVerbose(3, "VBoxStatsReportStatistics: stats report failed with rc=%Rrc\n", rc);
     579        if (!fCpuInfoAvail)
     580        {
     581            VBoxServiceVerbose(3, "VBoxStatsReportStatistics: CPU info not available!\n");
     582            rc = VbglR3StatReport(&req);
     583            if (RT_SUCCESS(rc))
     584                VBoxServiceVerbose(3, "VBoxStatsReportStatistics: new statistics reported successfully!\n");
     585            else
     586                VBoxServiceVerbose(3, "VBoxStatsReportStatistics: stats report failed with rc=%Rrc\n", rc);
     587        }
    577588
    578589        kstat_close(pStatKern);
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