VirtualBox

Changeset 61567 in vbox


Ignore:
Timestamp:
Jun 8, 2016 9:51:39 AM (9 years ago)
Author:
vboxsync
Message:

ValidationKit: Query the guest stack for all VCPUs and add it to the misc info items

Location:
trunk/src/VBox/ValidationKit/testdriver
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testdriver/vbox.py

    r61520 r61567  
    25652565        asMiscInfos = [];
    25662566        if self.fAlwaysUploadLogs or reporter.testErrorCount() > 0:
     2567            # Dump the guest stack for all CPUs.
     2568            cCpus = oSession.getCpuCount();
     2569            if cCpus > 0:
     2570                for iCpu in xrange(0, cCpus):
     2571                    sThis = oSession.queryDbgGuestStack(iCpu);
     2572                    if sThis is not None and len(sThis) > 0:
     2573                        asMiscInfos += [
     2574                            '================ start guest stack VCPU %s ================\n' % (iCpu,),
     2575                            sThis,
     2576                            '================ end guest stack VCPU %s ==================\n' % (iCpu,),
     2577                        ];
     2578
    25672579            for sInfo, sArg in [ ('mode', 'all'),
    25682580                                 ('fflags', ''),
  • trunk/src/VBox/ValidationKit/testdriver/vboxwrappers.py

    r61552 r61567  
    15261526        return fRc;
    15271527
     1528    def getCpuCount(self):
     1529        """
     1530        Returns the number of CPUs.
     1531        Returns the number of CPUs on success and 0 on failure. Error information is logged.
     1532        """
     1533        cCpus = 0;
     1534        try:
     1535            cCpus = self.o.machine.CPUCount;
     1536        except:
     1537            reporter.errorXcpt('failed to get the CPU count of "%s"' % (self.sName,));
     1538
     1539        self.oTstDrv.processPendingEvents();
     1540        return cCpus;
     1541
    15281542    def ensureControllerAttached(self, sController):
    15291543        """
     
    24272441            reporter.logXcpt('Unable to query vgatext with arg "%s"' % (sArg,));
    24282442        return sVgaText;
     2443
     2444    def queryDbgGuestStack(self, iCpu = 0):
     2445        """
     2446        Returns the guest stack for the given VCPU.
     2447
     2448        Returns string containing the guest stack for the selected VCPU on success.
     2449        Returns None on failure.
     2450        """
     2451
     2452        #
     2453        # Load all plugins first and try to detect the OS so we can
     2454        # get nicer stack traces.
     2455        #
     2456        try:
     2457            self.o.console.debugger.loadPlugIn('all');
     2458        except:
     2459            reporter.logXcpt('Unable to load debugger plugins');
     2460        else:
     2461            try:
     2462                sOsDetected = self.o.console.debugger.detectOS();
     2463            except:
     2464                reporter.logXcpt('Failed to detect the guest OS');
     2465
     2466        sGuestStack = None;
     2467        try:
     2468            sGuestStack = self.o.console.debugger.dumpGuestStack(iCpu);
     2469        except:
     2470            reporter.logXcpt('Unable to query guest stack for CPU %s' % (iCpu, ));
     2471
     2472        return sGuestStack;
    24292473
    24302474
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