Hi, I am using perfmon2 for thread-based self-monitoring. The thread executes many requests and I want to monitor each request separately. To make it little intrusive as possible, I am trying to minimize code for re-initialization of the PMU for each request as much as possible. For each request, I execute the following code now:
for (i=0; i < thd->mbrace_data.output_param.pfp_pmd_count; i++) { thd->mbrace_data.pmd[i].reg_value = 0; } if (pfm_write_pmds(thd->mbrace_data.context_fd, thd->mbrace_data.pmd, thd->mbrace_data.output_param.pfp_pmd_count)) { general_log_print(thd, COM_MBRACE, "mBrace: pfm_write_pmds error errno %d", errno); return; } if (pfm_start(thd->mbrace_data.context_fd, NULL)) { general_log_print(thd, COM_MBRACE, "mBrace: pfm_start error errno %d", errno); return; } But I was wondering, for thread-based self-monitoring, do I really need to call pfm_start and pfm_stop for every request? Or can I read/write the PMU without stopping pfm? Thank you, Andrej ------------------------------------------------------------------------------ _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel