[vbox-dev] [PATCH] CPU exec cap in GUI

Alexey Eromenko al4321 at gmail.com
Mon Jun 27 21:12:15 GMT 2011

Updated patch. (much cleaned up, only 18K instead of 27K)

Some questions:
1. Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
line 1649:
                      + QString (sSectionItemTpl2).arg (tr
("Processor(s)", "details report"),
("<nobr>%1</nobr>", "details report"))
                        .arg (aMachine.GetCPUCount())
What it does, regarding to SMP ?
2. So far I can't make it run-time change compatible.
2.a. The above forced me to remove proposed patch for

+++ vbox/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp	2011-06-22
12:32:40.000000000 -0400
@@ -573,6 +573,10 @@
                        .arg(VBoxGlobal::tr("VT-x/AMD-V", "details
report"), virtualization)
                        .arg(VBoxGlobal::tr("Nested Paging"), nestedPaging));

+        int cpuCap = console.GetMachine().GetCPUExecutionCap();
+        tip += QApplication::translate("UIIndicatorsPool",
"<br><nobr><b>%1:</b> %2 %</nobr>", "Virtualization Stuff LED")
+                  .arg(VBoxGlobal::tr("CPU Execution Cap", "details
         int cpuCount = console.GetMachine().GetCPUCount();
         if (cpuCount > 1)
             tip += QApplication::translate("UIIndicatorsPool",
"<br><nobr><b>%1:</b> %2</nobr>", "Virtualization Stuff LED")

The problem, is that if the use changes the CPU cap value from
VBoxManage CLI, it doesn't get updated in the indicator. I couldn't
find the right Qt slot/signal to fix real-time updates.

So doing:
$ VBoxManage controlvm "Windows XP immu 03" cpuexecutioncap 45
changes the main GUI summary, but not the UI indicator.

Best wishes,
-Alexey Eromenko "Technologov"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vbox-gui-cpu-exec-cap-v2.patch
Type: application/octet-stream
Size: 17574 bytes
Desc: not available
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20110628/156441d5/attachment.obj>

More information about the vbox-dev mailing list