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 ============================================================================ */
29 typedef 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 
45 void
46 PERF_PRINT_done(PERF_Private *perf);
47 
48 PERF_PRINT_Private *
49 PERF_PRINT_create(PERF_Private *perf, PERF_Config *config,
50                   PERF_MODULETYPE eModule);
51 
52 void
53 __print_Boundary(FILE *fOut,
54                  PERF_Private *perf,PERF_BOUNDARYTYPE eBoundary);
55 
56 void
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 
63 void
64 __print_Command(FILE *fOut,
65                 PERF_Private *perf,
66                 unsigned long ulCommand,
67                 unsigned long ulArgument,
68                 PERF_MODULETYPE eModule);
69 
70 void
71 __print_Create(FILE *fOut,
72                PERF_Private *perf);
73 
74 void
75 __print_Done(FILE *fOut,
76              PERF_Private *perf);
77 
78 void
79 __print_Log(FILE *fOut,
80             PERF_Private *perf,
81             unsigned long ulData1, unsigned long ulData2,
82             unsigned long ulData3);
83 
84 void
85 __print_SyncAV(FILE *fOut,
86                PERF_Private *perf,
87                float pfTimeAudio,
88                float pfTimeVideo,
89                PERF_SYNCOPTYPE eSyncOperation);
90 
91 void
92 __print_ThreadCreated(FILE *fOut,
93                       PERF_Private *perf,
94                       unsigned long ulThreadID,
95                       unsigned long ulThreadName);
96 
97 #ifdef __PERF_LOG_LOCATION__
98 void
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