Mercurial > hg > Game > Cerium
view TaskManager/Cell/spe/CellDmaManager.h @ 672:27fec8c70c9c draft
add profiling code
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 05 Dec 2009 20:20:08 +0900 |
parents | 30dd8a3deb4a |
children | daff9d9fd6a0 |
line wrap: on
line source
#ifndef INCLUDED_CELL_DMA_MANAGER #define INCLUDED_CELL_DMA_MANAGER #include "base.h" #include "types.h" #include "DmaManager.h" #include <spu_mfcio.h> #define SPU_PROFILE 1 class CellDmaManager : public DmaManager { public: BASE_NEW_DELETE(CellDmaManager); typedef struct dma_list { uint32 addr; // should be memaddr, but in Cell's specification... uint32 size; } DmaList, *DmaListPtr; CellDmaManager() ; /* variables */ unsigned int wait_time, busy_time; unsigned long long global_busy_time, global_wait_time; /* functions */ void dma_load(void *buf, memaddr addr, uint32 size, uint32 mask); void dma_store(void *buf, memaddr addr, uint32 size, uint32 mask); void dma_wait(uint32 mask) ; void (CellDmaManager::*start_dmawait_profile)(); void (CellDmaManager::*end_dmawait_profile)(); void start_profile(); void stop_profile(); void show_dma_wait(int cpu); void mail_write(memaddr data); memaddr mail_read(); void dma_loadList(ListDataPtr list, void *buff, uint32 mask); void dma_storeList(ListDataPtr, void *buff, uint32 mask); private: void do_start_dmawait_profile(); void do_end_dmawait_profile(); void null_start_dmawait_profile(); void null_end_dmawait_profile(); /* end */ }; #endif