mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	Core timing 2.0 (#4913)
* Core::Timing: Add multiple timer, one for each core * revert clang-format; work on tests for CoreTiming * Kernel:: Add support for multiple cores, asserts in HandleSyncRequest because Thread->status == WaitIPC * Add some TRACE_LOGs * fix tests * make some adjustments to qt-debugger, cheats and gdbstub(probably still broken) * Make ARM_Interface::id private, rework ARM_Interface ctor * ReRename TimingManager to Timing for smaler diff * addressed review comments
This commit is contained in:
		
							parent
							
								
									e3dbdcbdff
								
							
						
					
					
						commit
						55ec7031cc
					
				
					 32 changed files with 760 additions and 535 deletions
				
			
		|  | @ -61,13 +61,14 @@ void RegistersWidget::OnDebugModeEntered() { | |||
|     if (!Core::System::GetInstance().IsPoweredOn()) | ||||
|         return; | ||||
| 
 | ||||
|     // Todo: Handle all cores
 | ||||
|     for (int i = 0; i < core_registers->childCount(); ++i) | ||||
|         core_registers->child(i)->setText( | ||||
|             1, QStringLiteral("0x%1").arg(Core::CPU().GetReg(i), 8, 16, QLatin1Char('0'))); | ||||
|             1, QStringLiteral("0x%1").arg(Core::GetCore(0).GetReg(i), 8, 16, QLatin1Char('0'))); | ||||
| 
 | ||||
|     for (int i = 0; i < vfp_registers->childCount(); ++i) | ||||
|         vfp_registers->child(i)->setText( | ||||
|             1, QStringLiteral("0x%1").arg(Core::CPU().GetVFPReg(i), 8, 16, QLatin1Char('0'))); | ||||
|             1, QStringLiteral("0x%1").arg(Core::GetCore(0).GetVFPReg(i), 8, 16, QLatin1Char('0'))); | ||||
| 
 | ||||
|     UpdateCPSRValues(); | ||||
|     UpdateVFPSystemRegisterValues(); | ||||
|  | @ -127,7 +128,8 @@ void RegistersWidget::CreateCPSRChildren() { | |||
| } | ||||
| 
 | ||||
| void RegistersWidget::UpdateCPSRValues() { | ||||
|     const u32 cpsr_val = Core::CPU().GetCPSR(); | ||||
|     // Todo: Handle all cores
 | ||||
|     const u32 cpsr_val = Core::GetCore(0).GetCPSR(); | ||||
| 
 | ||||
|     cpsr->setText(1, QStringLiteral("0x%1").arg(cpsr_val, 8, 16, QLatin1Char('0'))); | ||||
|     cpsr->child(0)->setText( | ||||
|  | @ -191,10 +193,11 @@ void RegistersWidget::CreateVFPSystemRegisterChildren() { | |||
| } | ||||
| 
 | ||||
| void RegistersWidget::UpdateVFPSystemRegisterValues() { | ||||
|     const u32 fpscr_val = Core::CPU().GetVFPSystemReg(VFP_FPSCR); | ||||
|     const u32 fpexc_val = Core::CPU().GetVFPSystemReg(VFP_FPEXC); | ||||
|     const u32 fpinst_val = Core::CPU().GetVFPSystemReg(VFP_FPINST); | ||||
|     const u32 fpinst2_val = Core::CPU().GetVFPSystemReg(VFP_FPINST2); | ||||
|     // Todo: handle all cores
 | ||||
|     const u32 fpscr_val = Core::GetCore(0).GetVFPSystemReg(VFP_FPSCR); | ||||
|     const u32 fpexc_val = Core::GetCore(0).GetVFPSystemReg(VFP_FPEXC); | ||||
|     const u32 fpinst_val = Core::GetCore(0).GetVFPSystemReg(VFP_FPINST); | ||||
|     const u32 fpinst2_val = Core::GetCore(0).GetVFPSystemReg(VFP_FPINST2); | ||||
| 
 | ||||
|     QTreeWidgetItem* const fpscr = vfp_system_registers->child(0); | ||||
|     fpscr->setText(1, QStringLiteral("0x%1").arg(fpscr_val, 8, 16, QLatin1Char('0'))); | ||||
|  |  | |||
|  | @ -12,6 +12,7 @@ | |||
| #include "core/hle/kernel/thread.h" | ||||
| #include "core/hle/kernel/timer.h" | ||||
| #include "core/hle/kernel/wait_object.h" | ||||
| #include "core/settings.h" | ||||
| 
 | ||||
| WaitTreeItem::~WaitTreeItem() = default; | ||||
| 
 | ||||
|  | @ -51,12 +52,16 @@ std::size_t WaitTreeItem::Row() const { | |||
| } | ||||
| 
 | ||||
| std::vector<std::unique_ptr<WaitTreeThread>> WaitTreeItem::MakeThreadItemList() { | ||||
|     const auto& threads = Core::System::GetInstance().Kernel().GetThreadManager().GetThreadList(); | ||||
|     u32 num_cores = Core::GetNumCores(); | ||||
|     std::vector<std::unique_ptr<WaitTreeThread>> item_list; | ||||
|     item_list.reserve(threads.size()); | ||||
|     for (std::size_t i = 0; i < threads.size(); ++i) { | ||||
|         item_list.push_back(std::make_unique<WaitTreeThread>(*threads[i])); | ||||
|         item_list.back()->row = i; | ||||
|     for (u32 i = 0; i < num_cores; ++i) { | ||||
|         const auto& threads = | ||||
|             Core::System::GetInstance().Kernel().GetThreadManager(i).GetThreadList(); | ||||
|         item_list.reserve(item_list.size() + threads.size()); | ||||
|         for (std::size_t i = 0; i < threads.size(); ++i) { | ||||
|             item_list.push_back(std::make_unique<WaitTreeThread>(*threads[i])); | ||||
|             item_list.back()->row = i; | ||||
|         } | ||||
|     } | ||||
|     return item_list; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue