msm: vidc: Add trace for every buffer transaction

Tracing all the buffer transactions give clear picture of
session behaviour and is helpful in performance analysis.

CRs-Fixed: 2478892
Change-Id: Ibab23a187af77434e20ce0b1c51de29b9d1731f9
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
This commit is contained in:
Chinmay Sawarkar 2019-06-25 15:27:27 -07:00
parent ab390d0f2d
commit 04f6c63d2d

View File

@ -480,6 +480,9 @@ void msm_vidc_debugfs_update(struct msm_vidc_inst *inst,
switch (e) {
case MSM_VIDC_DEBUGFS_EVENT_ETB:
inst->count.etb++;
trace_msm_v4l2_vidc_buffer_counter("ETB",
inst->count.etb, inst->count.ebd,
inst->count.ftb, inst->count.fbd);
if (inst->count.ebd && inst->count.ftb > inst->count.fbd) {
d->pdata[FRAME_PROCESSING].name[0] = '\0';
tic(inst, FRAME_PROCESSING, a);
@ -487,6 +490,9 @@ void msm_vidc_debugfs_update(struct msm_vidc_inst *inst,
break;
case MSM_VIDC_DEBUGFS_EVENT_EBD:
inst->count.ebd++;
trace_msm_v4l2_vidc_buffer_counter("EBD",
inst->count.etb, inst->count.ebd,
inst->count.ftb, inst->count.fbd);
if (inst->count.ebd && inst->count.ebd == inst->count.etb) {
toc(inst, FRAME_PROCESSING);
dprintk(VIDC_PERF, "EBD: FW needs input buffers\n");
@ -496,6 +502,9 @@ void msm_vidc_debugfs_update(struct msm_vidc_inst *inst,
break;
case MSM_VIDC_DEBUGFS_EVENT_FTB: {
inst->count.ftb++;
trace_msm_v4l2_vidc_buffer_counter("FTB",
inst->count.etb, inst->count.ebd,
inst->count.ftb, inst->count.fbd);
if (inst->count.ebd && inst->count.etb > inst->count.ebd) {
d->pdata[FRAME_PROCESSING].name[0] = '\0';
tic(inst, FRAME_PROCESSING, a);
@ -505,6 +514,9 @@ void msm_vidc_debugfs_update(struct msm_vidc_inst *inst,
case MSM_VIDC_DEBUGFS_EVENT_FBD:
inst->count.fbd++;
inst->debug.samples++;
trace_msm_v4l2_vidc_buffer_counter("FBD",
inst->count.etb, inst->count.ebd,
inst->count.ftb, inst->count.fbd);
if (inst->count.fbd &&
inst->count.fbd == inst->count.ftb) {
toc(inst, FRAME_PROCESSING);