1
2/*
3 * Copyright (C) Texas Instruments - http://www.ti.com/
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 * Lesser General Public License for more details.
15 *
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
20 */
21#ifndef __PERF_PRINT_H
22#define __PERF_PRINT_H
23
24#include "stdio.h"
25#include "perf_obj.h"
26/* ============================================================================
27   DEBUG STRUCTURES
28============================================================================ */
29typedef struct PERF_PRINT_Private
30{
31    char *info;                    /* PERF instance information text */
32    char *prompt;                  /* PERF prompt */
33    FILE *fDebug;                  /* file to event debugs */
34    FILE *fPrint;                  /* file to event prints (Buffer) */
35    /* NOTE: fPrint == fDebug or fPrint == NULL */
36    int   csv;                     /* CSV format */
37#ifdef __PERF_LOG_LOCATION__
38    /* location information to be printed */
39    const char *szFile;
40    const char *szFunc;
41    unsigned long ulLine;
42#endif
43} PERF_PRINT_Private;
44
45void
46PERF_PRINT_done(PERF_Private *perf);
47
48PERF_PRINT_Private *
49PERF_PRINT_create(PERF_Private *perf, PERF_Config *config,
50                  PERF_MODULETYPE eModule);
51
52void
53__print_Boundary(FILE *fOut,
54                 PERF_Private *perf,PERF_BOUNDARYTYPE eBoundary);
55
56void
57__print_Buffer(FILE *fOut,
58               PERF_Private *perf,unsigned long ulAddress1,
59               unsigned long ulAddress2,
60               unsigned long ulSize,
61               PERF_MODULETYPE eModule);
62
63void
64__print_Command(FILE *fOut,
65                PERF_Private *perf,
66                unsigned long ulCommand,
67                unsigned long ulArgument,
68                PERF_MODULETYPE eModule);
69
70void
71__print_Create(FILE *fOut,
72               PERF_Private *perf);
73
74void
75__print_Done(FILE *fOut,
76             PERF_Private *perf);
77
78void
79__print_Log(FILE *fOut,
80            PERF_Private *perf,
81            unsigned long ulData1, unsigned long ulData2,
82            unsigned long ulData3);
83
84void
85__print_SyncAV(FILE *fOut,
86               PERF_Private *perf,
87               float pfTimeAudio,
88               float pfTimeVideo,
89               PERF_SYNCOPTYPE eSyncOperation);
90
91void
92__print_ThreadCreated(FILE *fOut,
93                      PERF_Private *perf,
94                      unsigned long ulThreadID,
95                      unsigned long ulThreadName);
96
97#ifdef __PERF_LOG_LOCATION__
98void
99__print_Location(PERF_Private *perf,
100                 char const *szFile,
101                 unsigned long ulLine,
102                 char const *szFunc);
103#endif
104
105#endif
106
107