Exemple #1
0
void cmdq_mmp_init(void)
{
#if CMDQ_PROFILE_MMP
	MMProfileEnable(1);
	if (CMDQ_MMP_Events.CMDQ == 0) {
		CMDQ_MMP_Events.CMDQ = MMProfileRegisterEvent(MMP_RootEvent, "CMDQ");
		CMDQ_MMP_Events.thread_en =
		    MMProfileRegisterEvent(CMDQ_MMP_Events.CMDQ, "thread_en");
		CMDQ_MMP_Events.CMDQ_IRQ = MMProfileRegisterEvent(CMDQ_MMP_Events.CMDQ, "CMDQ_IRQ");
		CMDQ_MMP_Events.warning = MMProfileRegisterEvent(CMDQ_MMP_Events.CMDQ, "warning");
		CMDQ_MMP_Events.loopBeat = MMProfileRegisterEvent(CMDQ_MMP_Events.CMDQ, "loopBeat");

		CMDQ_MMP_Events.autoRelease_add =
		    MMProfileRegisterEvent(CMDQ_MMP_Events.CMDQ, "autoRelease_add");
		CMDQ_MMP_Events.autoRelease_done =
		    MMProfileRegisterEvent(CMDQ_MMP_Events.CMDQ, "autoRelease_done");
		CMDQ_MMP_Events.consume_add =
		    MMProfileRegisterEvent(CMDQ_MMP_Events.CMDQ, "consume_add");
		CMDQ_MMP_Events.consume_done =
		    MMProfileRegisterEvent(CMDQ_MMP_Events.CMDQ, "consume_done");
		CMDQ_MMP_Events.alloc_task =
		    MMProfileRegisterEvent(CMDQ_MMP_Events.CMDQ, "alloc_task");
		CMDQ_MMP_Events.wait_task =
		    MMProfileRegisterEvent(CMDQ_MMP_Events.CMDQ, "wait_task");
		CMDQ_MMP_Events.wait_thread =
		    MMProfileRegisterEvent(CMDQ_MMP_Events.CMDQ, "wait_thread");
		CMDQ_MMP_Events.MDP_reset =
		    MMProfileRegisterEvent(CMDQ_MMP_Events.CMDQ, "MDP_reset");

		MMProfileEnableEventRecursive(CMDQ_MMP_Events.CMDQ, 1);
	}
	MMProfileStart(1);
#endif
}
void ion_profile_init(void)
{
	MMP_Event ION_Event;

	MMProfileEnable(1);
	ION_Event = MMProfileRegisterEvent(MMP_RootEvent, "ION");
	ION_MMP_Events[PROFILE_ALLOC] = MMProfileRegisterEvent(ION_Event, "alloc");
	ION_MMP_Events[PROFILE_FREE] = MMProfileRegisterEvent(ION_Event, "free");
	ION_MMP_Events[PROFILE_SHARE] = MMProfileRegisterEvent(ION_Event, "share");
	ION_MMP_Events[PROFILE_IMPORT] = MMProfileRegisterEvent(ION_Event, "import");
	ION_MMP_Events[PROFILE_MAP_KERNEL] = MMProfileRegisterEvent(ION_Event, "map_kern");
	ION_MMP_Events[PROFILE_UNMAP_KERNEL] = MMProfileRegisterEvent(ION_Event, "unmap_kern");
	ION_MMP_Events[PROFILE_MAP_USER] = MMProfileRegisterEvent(ION_Event, "map_user");
	ION_MMP_Events[PROFILE_UNMAP_USER] = MMProfileRegisterEvent(ION_Event, "unmap_user");
	ION_MMP_Events[PROFILE_CUSTOM_IOC] = MMProfileRegisterEvent(ION_Event, "custom_ioc");
	ION_MMP_Events[PROFILE_GET_PHYS] = MMProfileRegisterEvent(ION_Event, "phys");
	ION_MMP_Events[PROFILE_DMA_CLEAN_RANGE] = MMProfileRegisterEvent(ION_Event, "clean_range");
	ION_MMP_Events[PROFILE_DMA_FLUSH_RANGE] = MMProfileRegisterEvent(ION_Event, "flush_range");
	ION_MMP_Events[PROFILE_DMA_INVALID_RANGE] = MMProfileRegisterEvent(ION_Event, "inv_range");
	ION_MMP_Events[PROFILE_DMA_CLEAN_ALL] = MMProfileRegisterEvent(ION_Event, "clean_all");
	ION_MMP_Events[PROFILE_DMA_FLUSH_ALL] = MMProfileRegisterEvent(ION_Event, "flush_all");
	ION_MMP_Events[PROFILE_DMA_INVALID_ALL] = MMProfileRegisterEvent(ION_Event, "inv_all");

	/* enable events by default */
	MMProfileEnableEvent(ION_MMP_Events[PROFILE_ALLOC], 1);
	MMProfileEnableEvent(ION_MMP_Events[PROFILE_MAP_KERNEL], 1);
	MMProfileEnableEvent(ION_MMP_Events[PROFILE_MAP_USER], 1);
	MMProfileEnableEvent(ION_MMP_Events[PROFILE_DMA_CLEAN_RANGE], 1);
	MMProfileEnableEvent(ION_MMP_Events[PROFILE_DMA_FLUSH_RANGE], 1);
	MMProfileEnableEvent(ION_MMP_Events[PROFILE_DMA_INVALID_RANGE], 1);
	MMProfileEnableEvent(ION_MMP_Events[PROFILE_DMA_CLEAN_ALL], 1);
	MMProfileEnableEvent(ION_MMP_Events[PROFILE_DMA_FLUSH_ALL], 1);
	MMProfileEnableEvent(ION_MMP_Events[PROFILE_DMA_INVALID_ALL], 1);
	MMProfileStart(1);
}
void sodi_mmp_init(void)
{
    printk("sodi_mmp_init\n");
    MMProfileEnable(1);
    init_sodi_mmp_events();
    MMProfileStart(1);
}
void ddp_mmp_init(void)
{
#ifdef DEFAULT_MMP_ENABLE
    DDPMSG("ddp_mmp_init\n");
    MMProfileEnable(1);
    init_ddp_mmp_events();
    MMProfileStart(1);
#endif
}