Changeset 4571 in vbox
- Timestamp:
- Sep 6, 2007 12:31:23 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxGuest.h
r4570 r4571 371 371 typedef struct VBoxGuestStatistics 372 372 { 373 /** Virtual CPU id */ 374 uint32_t u32CpuId; 373 375 /** Reported statistics */ 374 376 uint32_t u32StatCaps; -
trunk/src/VBox/Main/GuestImpl.cpp
r4570 r4571 263 263 } 264 264 265 STDMETHODIMP Guest::GetStatistic( GuestStatisticType_T statistic, ULONG *aStatVal)265 STDMETHODIMP Guest::GetStatistic(ULONG aCpuId, GuestStatisticType_T aStatistic, ULONG *aStatVal) 266 266 { 267 267 if (!aStatVal) 268 268 return E_INVALIDARG; 269 269 270 switch(statistic) 270 if (aCpuId != 0) 271 return E_INVALIDARG; 272 273 switch(aStatistic) 271 274 { 272 275 case GuestStatisticType_CPULoad_Idle: … … 288 291 } 289 292 290 STDMETHODIMP Guest::SetStatistic(GuestStatisticType_T statistic, ULONG aStatVal) 291 { 292 switch(statistic) 293 STDMETHODIMP Guest::SetStatistic(ULONG aCpuId, GuestStatisticType_T aStatistic, ULONG aStatVal) 294 { 295 if (aCpuId != 0) 296 return E_INVALIDARG; 297 298 switch(aStatistic) 293 299 { 294 300 case GuestStatisticType_CPULoad_Idle: -
trunk/src/VBox/Main/VMMDevInterface.cpp
r4570 r4571 405 405 406 406 if (pGuestStats->u32StatCaps & VBOX_GUEST_STAT_CPU_LOAD_IDLE) 407 guest->SetStatistic( GuestStatisticType_CPULoad_Idle, pGuestStats->u32CpuLoad_Idle);407 guest->SetStatistic(pGuestStats->u32CpuId, GuestStatisticType_CPULoad_Idle, pGuestStats->u32CpuLoad_Idle); 408 408 409 409 if (pGuestStats->u32StatCaps & VBOX_GUEST_STAT_CPU_LOAD_KERNEL) 410 guest->SetStatistic( GuestStatisticType_CPULoad_Kernel, pGuestStats->u32CpuLoad_Kernel);410 guest->SetStatistic(pGuestStats->u32CpuId, GuestStatisticType_CPULoad_Kernel, pGuestStats->u32CpuLoad_Kernel); 411 411 412 412 if (pGuestStats->u32StatCaps & VBOX_GUEST_STAT_CPU_LOAD_USER) 413 guest->SetStatistic( GuestStatisticType_CPULoad_User, pGuestStats->u32CpuLoad_User);413 guest->SetStatistic(pGuestStats->u32CpuId, GuestStatisticType_CPULoad_User, pGuestStats->u32CpuLoad_User); 414 414 415 415 if (pGuestStats->u32StatCaps & VBOX_GUEST_STAT_THREADS) 416 guest->SetStatistic( GuestStatisticType_Threads, pGuestStats->u32Threads);416 guest->SetStatistic(pGuestStats->u32CpuId, GuestStatisticType_Threads, pGuestStats->u32Threads); 417 417 418 418 if (pGuestStats->u32StatCaps & VBOX_GUEST_STAT_PROCESSES) 419 guest->SetStatistic( GuestStatisticType_Processes, pGuestStats->u32Processes);419 guest->SetStatistic(pGuestStats->u32CpuId, GuestStatisticType_Processes, pGuestStats->u32Processes); 420 420 421 421 if (pGuestStats->u32StatCaps & VBOX_GUEST_STAT_PHYS_MEM_TOTAL) 422 guest->SetStatistic( GuestStatisticType_PhysMemTotal, pGuestStats->u32PhysMemTotal);422 guest->SetStatistic(pGuestStats->u32CpuId, GuestStatisticType_PhysMemTotal, pGuestStats->u32PhysMemTotal); 423 423 424 424 if (pGuestStats->u32StatCaps & VBOX_GUEST_STAT_PHYS_MEM_AVAIL) 425 guest->SetStatistic( GuestStatisticType_PhysMemAvailable, pGuestStats->u32PhysMemAvail);425 guest->SetStatistic(pGuestStats->u32CpuId, GuestStatisticType_PhysMemAvailable, pGuestStats->u32PhysMemAvail); 426 426 427 427 if (pGuestStats->u32StatCaps & VBOX_GUEST_STAT_PHYS_MEM_BALLOON) 428 guest->SetStatistic( GuestStatisticType_PhysMemBalloon, pGuestStats->u32PhysMemBalloon);428 guest->SetStatistic(pGuestStats->u32CpuId, GuestStatisticType_PhysMemBalloon, pGuestStats->u32PhysMemBalloon); 429 429 430 430 if (pGuestStats->u32StatCaps & VBOX_GUEST_STAT_PAGE_FILE_SIZE) 431 guest->SetStatistic( GuestStatisticType_PageFileSize, pGuestStats->u32PageFileSize);431 guest->SetStatistic(pGuestStats->u32CpuId, GuestStatisticType_PageFileSize, pGuestStats->u32PageFileSize); 432 432 433 433 return VINF_SUCCESS; -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r4570 r4571 4380 4380 <interface 4381 4381 name="IGuest" extends="$unknown" 4382 uuid=" 5d54a565-813c-42a0-a81a-e31779e03186"4382 uuid="c101f037-b03d-4bd4-bd25-381123980be2" 4383 4383 wsmap="suppress" 4384 4384 > … … 4468 4468 Query specified guest statistics as reported by the VirtualBox Additions. 4469 4469 </desc> 4470 <param name="cpuId" type="unsigned long" dir="in"> 4471 <desc>Virtual CPU id; not relevant for all statistic types</desc> 4472 </param> 4470 4473 <param name="statistic" type="GuestStatisticType" dir="in"> 4471 4474 <desc>Statistic type.</desc> -
trunk/src/VBox/Main/include/GuestImpl.h
r4318 r4571 64 64 STDMETHOD(SetCredentials)(INPTR BSTR aUserName, INPTR BSTR aPassword, 65 65 INPTR BSTR aDomain, BOOL aAllowInteractiveLogon); 66 STDMETHOD(GetStatistic)( GuestStatisticType_T statistic, ULONG *aStatVal);66 STDMETHOD(GetStatistic)(ULONG aCpuId, GuestStatisticType_T aStatistic, ULONG *aStatVal); 67 67 68 68 // public methods that are not in IDL … … 71 71 void setSupportsSeamless (BOOL aSupportsSeamless); 72 72 73 STDMETHOD(SetStatistic)( GuestStatisticType_T statistic, ULONG aStatVal);73 STDMETHOD(SetStatistic)(ULONG aCpuId, GuestStatisticType_T aStatistic, ULONG aStatVal); 74 74 75 75 // for VirtualBoxSupportErrorInfoImpl
Note:
See TracChangeset
for help on using the changeset viewer.