void CCpuMeter::ChangeNumberOfCores(TInt aNum) { test.SetLogged(ETrue); test.Printf(_L("#CORES->%d\n"), aNum); TInt r = UserSvr::HalFunction(EHalGroupKernel, EKernelHalSetNumberOfCpus, (TAny*)aNum, 0); if (r != KErrNone) { test.Printf(_L("Error %d\n"), r); } test.SetLogged(EFalse); }
void CCpuMeter::DisplayCoreControlInfo() { SCpuStates s; TInt r = UserSvr::HalFunction(EHalGroupKernel, EKernelHalCpuStates, &s, 0); if (r != KErrNone) { test.Printf(_L("Error %d\n"), r); return; } test.SetLogged(ETrue); test.Printf(_L(" TA=%08x IA=%08x CU=%08x GD=%08x DC=%08x\n"), s.iTA, s.iIA, s.iCU, s.iGD, s.iDC); test.Printf(_L(" SC=%08x RC=%08x PO=%02x CCS=%08x PODC=%08x\n"), s.iSC, s.iRC, s.iPO, s.iCCS, s.iPODC); TInt i; for (i=0; i<iNumCpus; ++i) { test.Printf(_L("%1d:DS=%08x UDC=%08x UAC=%08x OP=%08x F=%08x\n"), i, s.iDS[i], s.iUDC[i], s.iUAC[i], s.iOP[i], s.iF[i]); } test.SetLogged(EFalse); }
GLDEF_C TInt E32Main() { test.SetLogged(EFalse); test.Title(); RThread().SetPriority(EPriorityAbsoluteHigh); if (CpuTimeSupported()) { UseKernelCpuTime(); } if (NumberOfCpus()>1) { test.Printf(_L("Needs RThread::GetCpuTime() on SMP systems\n")); } else MeasureByNOPs(); return 0; }
TInt E32Main() { gTest.Title(); gTest.Start(_L("Start-up mode test sets")); gTest.SetLogged(ETrue); TInt r = gRFs.Connect(); gTest(r == KErrNone); DoTest(); TestPlatSec(); gRFs.Close(); gTest.End(); gTest.Close(); return 0; }