]> git.ipfire.org Git - people/ms/u-boot.git/blob - drivers/net/npe/include/IxPerfProfAcc.h
Consolidate bool type
[people/ms/u-boot.git] / drivers / net / npe / include / IxPerfProfAcc.h
1 /**
2 * @file IxPerfProfAcc.h
3 *
4 * @brief Header file for the IXP400 Perf Prof component (IxPerfProfAcc)
5 *
6 *
7 * @par
8 * IXP400 SW Release version 2.0
9 *
10 * -- Copyright Notice --
11 *
12 * @par
13 * Copyright 2001-2005, Intel Corporation.
14 * All rights reserved.
15 *
16 * @par
17 * Redistribution and use in source and binary forms, with or without
18 * modification, are permitted provided that the following conditions
19 * are met:
20 * 1. Redistributions of source code must retain the above copyright
21 * notice, this list of conditions and the following disclaimer.
22 * 2. Redistributions in binary form must reproduce the above copyright
23 * notice, this list of conditions and the following disclaimer in the
24 * documentation and/or other materials provided with the distribution.
25 * 3. Neither the name of the Intel Corporation nor the names of its contributors
26 * may be used to endorse or promote products derived from this software
27 * without specific prior written permission.
28 *
29 * @par
30 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
31 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
34 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
35 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
36 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
37 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
38 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
39 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
40 * SUCH DAMAGE.
41 *
42 * @par
43 * -- End of Copyright Notice --
44 */
45
46 /**
47 * @defgroup IxPerfProfAcc IXP400 Performance Profiling (IxPerfProfAcc) API
48 *
49 * @brief IXP400 Performance Profiling Utility component Public API.
50 * @li NOTE: Xcycle measurement is not supported in Linux.
51 *
52 *
53 * @{
54 */
55 #ifndef IXPERFPROFACC_H
56 #define IXPERFPROFACC_H
57
58 #include "IxOsal.h"
59
60 #ifdef __linux
61 #include <linux/proc_fs.h>
62 #endif
63
64 /*
65 * Section for #define
66 */
67 /**
68 * @ingroup IxPerfProfAcc
69 *
70 * @def IX_PERFPROF_ACC_XSCALE_PMU_MAX_PROFILE_SAMPLES
71 *
72 * @brief This is the maximum number of profiling samples allowed, which can be
73 * modified according to the user's discretion
74 */
75 #define IX_PERFPROF_ACC_XSCALE_PMU_MAX_PROFILE_SAMPLES 0xFFFF
76
77 /**
78 * @ingroup IxPerfProfAcc
79 *
80 * @def IX_PERFPROF_ACC_BUS_PMU_MAX_PECS
81 *
82 * @brief This is the maximum number of Programmable Event Counters available.
83 * This is a hardware specific and fixed value. Do not change.
84 *
85 */
86 #define IX_PERFPROF_ACC_BUS_PMU_MAX_PECS 7
87
88 /**
89 * @ingroup IxPerfProfAcc
90 *
91 * @def IX_PERFPROF_ACC_XCYCLE_MAX_NUM_OF_MEASUREMENTS
92 *
93 * @brief Max number of measurement allowed. This constant is used when
94 * creating storage array for Xcycle. When run in continuous mode,
95 * Xcycle will wrap around and re-use buffer.
96 */
97 #define IX_PERFPROF_ACC_XCYCLE_MAX_NUM_OF_MEASUREMENTS 600
98
99 #ifdef __linux
100 /**
101 * @ingroup IxPerfProfAcc
102 *
103 * @def IX_PERFPROF_ACC_XSCALE_PMU_SYMBOL_ACCURACY
104 *
105 * @brief Level of accuracy required for matching the PC Address to
106 * symbol address. This is used when the XScale PMU time/event
107 * sampling functions get the PC address and search for the
108 * corresponding symbol address.
109 */
110 #define IX_PERFPROF_ACC_XSCALE_PMU_SYMBOL_ACCURACY 0xffff
111
112 #endif /*__linux*/
113
114 /**
115 * @ingroup IxPerfProfAcc
116 *
117 * @def IX_PERFPROF_ACC_LOG
118 *
119 * @brief Mechanism for logging a formatted message for the PerfProfAcc component
120 *
121 * @param level UINT32 [in] - trace level
122 * @param device UINT32 [in] - output device
123 * @param str char* [in] - format string, similar to printf().
124 * @param a UINT32 [in] - first argument to display
125 * @param b UINT32 [in] - second argument to display
126 * @param c UINT32 [in] - third argument to display
127 * @param d UINT32 [in] - fourth argument to display
128 * @param e UINT32 [in] - fifth argument to display
129 * @param f UINT32 [in] - sixth argument to display
130 *
131 * @return none
132 */
133 #ifndef NDEBUG
134 #define IX_PERFPROF_ACC_LOG(level, device, str, a, b, c, d, e, f)\
135 (ixOsalLog (level, device, str, a, b, c, d, e, f))
136 #else /*do nothing*/
137 #define IX_PERFPROF_ACC_LOG(level, device, str, a, b, c, d, e, f)
138 #endif /*ifdef NDEBUG */
139
140 /*
141 * Section for struct
142 */
143
144 /**
145 * @brief contains summary of samples taken
146 *
147 * Structure contains all details of each program counter value - frequency
148 * that PC occurs
149 */
150 typedef struct
151 {
152 UINT32 programCounter; /**<the program counter value of the sample*/
153 UINT32 freq; /**<the frequency of the occurence of the sample*/
154 } IxPerfProfAccXscalePmuSamplePcProfile;
155
156 /**
157 * @brief contains results of a counter
158 *
159 * Structure contains the results of a counter, which are split into the lower
160 * and upper 32 bits of the final count
161 */
162 typedef struct
163 {
164 UINT32 lower32BitsEventCount; /**<lower 32bits value of the event counter*/
165 UINT32 upper32BitsEventCount; /**<upper 32bits value of the event counter*/
166 } IxPerfProfAccXscalePmuEvtCnt;
167
168 /**
169 * @brief contains results of counters and their overflow
170 *
171 * Structure contains all values of counters and associated overflows. The
172 * specific event and clock counters are determined by the user
173 */
174 typedef struct
175 {
176 UINT32 clk_value; /**<current value of clock counter*/
177 UINT32 clk_samples; /**<number of clock counter overflows*/
178 UINT32 event1_value; /**<current value of event 1 counter*/
179 UINT32 event1_samples; /**<number of event 1 counter overflows*/
180 UINT32 event2_value; /**<current value of event 2 counter*/
181 UINT32 event2_samples; /**<number of event 2 counter overflows*/
182 UINT32 event3_value; /**<current value of event 3 counter*/
183 UINT32 event3_samples; /**<number of event 3 counter overflows*/
184 UINT32 event4_value; /**<current value of event 4 counter*/
185 UINT32 event4_samples; /**<number of event 4 counter overflows*/
186 } IxPerfProfAccXscalePmuResults;
187
188 /**
189 *
190 * @brief Results obtained from Xcycle run
191 */
192 typedef struct
193 {
194 float maxIdlePercentage; /**<maximum percentage of Idle cycles*/
195 float minIdlePercentage; /**<minimum percentage of Idle cycles*/
196 float aveIdlePercentage; /**<average percentage of Idle cycles*/
197 UINT32 totalMeasurements; /**<total number of measurement made */
198 } IxPerfProfAccXcycleResults;
199
200 /**
201 *
202 * @brief Results obtained from running the Bus Pmu component. The results
203 * are obtained when the get functions is called.
204 *
205 */
206 typedef struct
207 {
208 UINT32 statsToGetLower27Bit[IX_PERFPROF_ACC_BUS_PMU_MAX_PECS]; /**<Lower 27 Bit of counter value */
209 UINT32 statsToGetUpper32Bit[IX_PERFPROF_ACC_BUS_PMU_MAX_PECS]; /**<Upper 32 Bit of counter value */
210 } IxPerfProfAccBusPmuResults;
211
212 /*
213 * Section for enum
214 */
215
216 /**
217 * @ingroup IxPerfProfAcc
218 *
219 * @enum IxPerfProfAccBusPmuEventCounters1
220 *
221 * @brief Type of bus pmu events supported on PEC 1.
222 *
223 * Lists all bus pmu events.
224 */
225 typedef enum
226 {
227 IX_PERFPROF_ACC_BUS_PMU_PEC1_NORTH_NPEA_GRANT_SELECT = 1, /**< Select North NPEA grant on PEC1*/
228 IX_PERFPROF_ACC_BUS_PMU_PEC1_NORTH_NPEB_GRANT_SELECT, /**< Select North NPEB grant on PEC1*/
229 IX_PERFPROF_ACC_BUS_PMU_PEC1_NORTH_NPEC_GRANT_SELECT, /**< Select North NPEC grant on PEC1*/
230 IX_PERFPROF_ACC_BUS_PMU_PEC1_NORTH_BUS_IDLE_SELECT, /**< Select North bus idle on PEC1*/
231 IX_PERFPROF_ACC_BUS_PMU_PEC1_NORTH_NPEA_REQ_SELECT, /**< Select North NPEA req on PEC1*/
232 IX_PERFPROF_ACC_BUS_PMU_PEC1_NORTH_NPEB_REQ_SELECT, /**< Select North NPEB req on PEC1*/
233 IX_PERFPROF_ACC_BUS_PMU_PEC1_NORTH_NPEC_REQ_SELECT, /**< Select North NPEC req on PEC1*/
234
235 IX_PERFPROF_ACC_BUS_PMU_PEC1_SOUTH_GSKT_GRANT_SELECT, /**< Select south gasket grant on PEC1*/
236 IX_PERFPROF_ACC_BUS_PMU_PEC1_SOUTH_ABB_GRANT_SELECT, /**< Select south abb grant on PEC1*/
237 IX_PERFPROF_ACC_BUS_PMU_PEC1_SOUTH_PCI_GRANT_SELECT, /**< Select south pci grant on PEC1*/
238 IX_PERFPROF_ACC_BUS_PMU_PEC1_SOUTH_APB_GRANT_SELECT, /**< Select south apb grant on PEC1*/
239 IX_PERFPROF_ACC_BUS_PMU_PEC1_SOUTH_GSKT_REQ_SELECT, /**< Select south gasket request on PEC1*/
240 IX_PERFPROF_ACC_BUS_PMU_PEC1_SOUTH_ABB_REQ_SELECT, /**< Select south abb request on PEC1*/
241 IX_PERFPROF_ACC_BUS_PMU_PEC1_SOUTH_PCI_REQ_SELECT, /**< Select south pci request on PEC1*/
242 IX_PERFPROF_ACC_BUS_PMU_PEC1_SOUTH_APB_REQ_SELECT, /**< Select south apb request on PEC1*/
243
244 IX_PERFPROF_ACC_BUS_PMU_PEC1_SDR_0_HIT_SELECT, /**< Select sdram0 hit on PEC1*/
245 IX_PERFPROF_ACC_BUS_PMU_PEC1_SDR_1_HIT_SELECT, /**< Select sdram1 hit on PEC1*/
246 IX_PERFPROF_ACC_BUS_PMU_PEC1_SDR_2_HIT_SELECT, /**< Select sdram2 hit on PEC1*/
247 IX_PERFPROF_ACC_BUS_PMU_PEC1_SDR_3_HIT_SELECT, /**< Select sdram3 hit on PEC1*/
248 IX_PERFPROF_ACC_BUS_PMU_PEC1_SDR_4_MISS_SELECT, /**< Select sdram4 miss on PEC1*/
249 IX_PERFPROF_ACC_BUS_PMU_PEC1_SDR_5_MISS_SELECT, /**< Select sdram5 miss on PEC1*/
250 IX_PERFPROF_ACC_BUS_PMU_PEC1_SDR_6_MISS_SELECT, /**< Select sdram6 miss on PEC1*/
251 IX_PERFPROF_ACC_BUS_PMU_PEC1_SDR_7_MISS_SELECT /**< Select sdram7 miss on PEC1*/
252 } IxPerfProfAccBusPmuEventCounters1;
253
254 /**
255 * @ingroup IxPerfProfAcc
256 *
257 * @enum IxPerfProfAccBusPmuEventCounters2
258 *
259 * @brief Type of bus pmu events supported on PEC 2.
260 *
261 * Lists all bus pmu events.
262 */
263 typedef enum
264 {
265 IX_PERFPROF_ACC_BUS_PMU_PEC2_NORTH_NPEA_XFER_SELECT = 24, /**< Select North NPEA transfer on PEC2*/
266 IX_PERFPROF_ACC_BUS_PMU_PEC2_NORTH_NPEB_XFER_SELECT, /**< Select North NPEB transfer on PEC2*/
267 IX_PERFPROF_ACC_BUS_PMU_PEC2_NORTH_NPEC_XFER_SELECT, /**< Select North NPEC transfer on PEC2*/
268 IX_PERFPROF_ACC_BUS_PMU_PEC2_NORTH_BUS_WRITE_SELECT, /**< Select North bus write on PEC2*/
269 IX_PERFPROF_ACC_BUS_PMU_PEC2_NORTH_NPEA_OWN_SELECT, /**< Select North NPEA own on PEC2*/
270 IX_PERFPROF_ACC_BUS_PMU_PEC2_NORTH_NPEB_OWN_SELECT, /**< Select North NPEB own on PEC2*/
271 IX_PERFPROF_ACC_BUS_PMU_PEC2_NORTH_NPEC_OWN_SELECT, /**< Select North NPEC own on PEC2*/
272
273 IX_PERFPROF_ACC_BUS_PMU_PEC2_SOUTH_GSKT_XFER_SELECT, /**< Select South gasket transfer on PEC2*/
274 IX_PERFPROF_ACC_BUS_PMU_PEC2_SOUTH_ABB_XFER_SELECT, /**< Select South abb transfer on PEC2*/
275 IX_PERFPROF_ACC_BUS_PMU_PEC2_SOUTH_PCI_XFER_SELECT, /**< Select South pci transfer on PEC2*/
276 IX_PERFPROF_ACC_BUS_PMU_PEC2_SOUTH_APB_XFER_SELECT, /**< Select South apb transfer on PEC2*/
277 IX_PERFPROF_ACC_BUS_PMU_PEC2_SOUTH_GSKT_OWN_SELECT, /**< Select South gasket own on PEC2*/
278 IX_PERFPROF_ACC_BUS_PMU_PEC2_SOUTH_ABB_OWN_SELECT, /**< Select South abb own on PEC2*/
279 IX_PERFPROF_ACC_BUS_PMU_PEC2_SOUTH_PCI_OWN_SELECT, /**< Select South pci own on PEC2*/
280 IX_PERFPROF_ACC_BUS_PMU_PEC2_SOUTH_APB_OWN_SELECT, /**< Select South apb own transfer on PEC2*/
281
282 IX_PERFPROF_ACC_BUS_PMU_PEC2_SDR_1_HIT_SELECT, /**< Select sdram1 hit on PEC2*/
283 IX_PERFPROF_ACC_BUS_PMU_PEC2_SDR_2_HIT_SELECT, /**< Select sdram2 hit on PEC2*/
284 IX_PERFPROF_ACC_BUS_PMU_PEC2_SDR_3_HIT_SELECT, /**< Select sdram3 hit on PEC2*/
285 IX_PERFPROF_ACC_BUS_PMU_PEC2_SDR_4_HIT_SELECT, /**< Select sdram4 hit on PEC2*/
286 IX_PERFPROF_ACC_BUS_PMU_PEC2_SDR_5_MISS_SELECT, /**< Select sdram5 miss on PEC2*/
287 IX_PERFPROF_ACC_BUS_PMU_PEC2_SDR_6_MISS_SELECT, /**< Select sdram6 miss on PEC2*/
288 IX_PERFPROF_ACC_BUS_PMU_PEC2_SDR_7_MISS_SELECT, /**< Select sdram7 miss on PEC2*/
289 IX_PERFPROF_ACC_BUS_PMU_PEC2_SDR_0_MISS_SELECT /**< Select sdram0 miss on PEC2*/
290 } IxPerfProfAccBusPmuEventCounters2;
291
292 /**
293 * @ingroup IxPerfProfAcc
294 *
295 * @enum IxPerfProfAccBusPmuEventCounters3
296 *
297 * @brief Type of bus pmu events supported on PEC 3.
298 *
299 * Lists all bus pmu events.
300 */
301 typedef enum
302 {
303 IX_PERFPROF_ACC_BUS_PMU_PEC3_NORTH_NPEA_RETRY_SELECT = 47, /**< Select north NPEA retry on PEC3*/
304 IX_PERFPROF_ACC_BUS_PMU_PEC3_NORTH_NPEB_RETRY_SELECT, /**< Select north NPEB retry on PEC3*/
305 IX_PERFPROF_ACC_BUS_PMU_PEC3_NORTH_NPEC_RETRY_SELECT, /**< Select north NPEC retry on PEC3*/
306 IX_PERFPROF_ACC_BUS_PMU_PEC3_NORTH_BUS_READ_SELECT, /**< Select north bus read on PEC3*/
307 IX_PERFPROF_ACC_BUS_PMU_PEC3_NORTH_NPEA_WRITE_SELECT, /**< Select north NPEA write on PEC3*/
308 IX_PERFPROF_ACC_BUS_PMU_PEC3_NORTH_NPEB_WRITE_SELECT, /**< Select north NPEB write on PEC3*/
309 IX_PERFPROF_ACC_BUS_PMU_PEC3_NORTH_NPEC_WRITE_SELECT, /**< Select north NPEC wirte on PEC3*/
310
311 IX_PERFPROF_ACC_BUS_PMU_PEC3_SOUTH_GSKT_RETRY_SELECT, /**< Select south gasket retry on PEC3*/
312 IX_PERFPROF_ACC_BUS_PMU_PEC3_SOUTH_ABB_RETRY_SELECT, /**< Select south abb retry on PEC3*/
313 IX_PERFPROF_ACC_BUS_PMU_PEC3_SOUTH_PCI_RETRY_SELECT, /**< Select south pci retry on PEC3*/
314 IX_PERFPROF_ACC_BUS_PMU_PEC3_SOUTH_APB_RETRY_SELECT, /**< Select south apb retry on PEC3*/
315 IX_PERFPROF_ACC_BUS_PMU_PEC3_SOUTH_GSKT_WRITE_SELECT, /**< Select south gasket write on PEC3*/
316 IX_PERFPROF_ACC_BUS_PMU_PEC3_SOUTH_ABB_WRITE_SELECT, /**< Select south abb write on PEC3*/
317 IX_PERFPROF_ACC_BUS_PMU_PEC3_SOUTH_PCI_WRITE_SELECT, /**< Select south pci write on PEC3*/
318 IX_PERFPROF_ACC_BUS_PMU_PEC3_SOUTH_APB_WRITE_SELECT, /**< Select south apb write on PEC3*/
319
320 IX_PERFPROF_ACC_BUS_PMU_PEC3_SDR_2_HIT_SELECT, /**< Select sdram2 hit on PEC3*/
321 IX_PERFPROF_ACC_BUS_PMU_PEC3_SDR_3_HIT_SELECT, /**< Select sdram3 hit on PEC3*/
322 IX_PERFPROF_ACC_BUS_PMU_PEC3_SDR_4_HIT_SELECT, /**< Select sdram4 hit on PEC3*/
323 IX_PERFPROF_ACC_BUS_PMU_PEC3_SDR_5_HIT_SELECT, /**< Select sdram5 hit on PEC3*/
324 IX_PERFPROF_ACC_BUS_PMU_PEC3_SDR_6_MISS_SELECT, /**< Select sdram6 miss on PEC3*/
325 IX_PERFPROF_ACC_BUS_PMU_PEC3_SDR_7_MISS_SELECT, /**< Select sdram7 miss on PEC3*/
326 IX_PERFPROF_ACC_BUS_PMU_PEC3_SDR_0_MISS_SELECT, /**< Select sdram0 miss on PEC3*/
327 IX_PERFPROF_ACC_BUS_PMU_PEC3_SDR_1_MISS_SELECT /**< Select sdram1 miss on PEC3*/
328 } IxPerfProfAccBusPmuEventCounters3;
329
330 /**
331 * @ingroup IxPerfProfAcc
332 *
333 * @enum IxPerfProfAccBusPmuEventCounters4
334 *
335 * @brief Type of bus pmu events supported on PEC 4.
336 *
337 * Lists all bus pmu events.
338 */
339 typedef enum
340 {
341 IX_PERFPROF_ACC_BUS_PMU_PEC4_SOUTH_PCI_SPLIT_SELECT = 70, /**< Select south pci split on PEC4*/
342 IX_PERFPROF_ACC_BUS_PMU_PEC4_SOUTH_EXP_SPLIT_SELECT, /**< Select south expansion split on PEC4*/
343 IX_PERFPROF_ACC_BUS_PMU_PEC4_SOUTH_APB_GRANT_SELECT, /**< Select south apb grant on PEC4*/
344 IX_PERFPROF_ACC_BUS_PMU_PEC4_SOUTH_APB_XFER_SELECT, /**< Select south apb transfer on PEC4*/
345 IX_PERFPROF_ACC_BUS_PMU_PEC4_SOUTH_GSKT_READ_SELECT, /**< Select south gasket read on PEC4*/
346 IX_PERFPROF_ACC_BUS_PMU_PEC4_SOUTH_ABB_READ_SELECT, /**< Select south abb read on PEC4*/
347 IX_PERFPROF_ACC_BUS_PMU_PEC4_SOUTH_PCI_READ_SELECT, /**< Select south pci read on PEC4*/
348 IX_PERFPROF_ACC_BUS_PMU_PEC4_SOUTH_APB_READ_SELECT, /**< Select south apb read on PEC4*/
349
350 IX_PERFPROF_ACC_BUS_PMU_PEC4_NORTH_ABB_SPLIT_SELECT, /**< Select north abb split on PEC4*/
351 IX_PERFPROF_ACC_BUS_PMU_PEC4_NORTH_NPEA_REQ_SELECT, /**< Select north NPEA req on PEC4*/
352 IX_PERFPROF_ACC_BUS_PMU_PEC4_NORTH_NPEA_READ_SELECT, /**< Select north NPEA read on PEC4*/
353 IX_PERFPROF_ACC_BUS_PMU_PEC4_NORTH_NPEB_READ_SELECT, /**< Select north NPEB read on PEC4*/
354 IX_PERFPROF_ACC_BUS_PMU_PEC4_NORTH_NPEC_READ_SELECT, /**< Select north NPEC read on PEC4*/
355
356 IX_PERFPROF_ACC_BUS_PMU_PEC4_SDR_3_HIT_SELECT, /**< Select sdram3 hit on PEC4*/
357 IX_PERFPROF_ACC_BUS_PMU_PEC4_SDR_4_HIT_SELECT, /**< Select sdram4 hit on PEC4*/
358 IX_PERFPROF_ACC_BUS_PMU_PEC4_SDR_5_HIT_SELECT, /**< Select sdram5 hit on PEC4*/
359 IX_PERFPROF_ACC_BUS_PMU_PEC4_SDR_6_HIT_SELECT, /**< Select sdram6 hit on PEC4*/
360 IX_PERFPROF_ACC_BUS_PMU_PEC4_SDR_7_MISS_SELECT, /**< Select sdram7 miss on PEC4*/
361 IX_PERFPROF_ACC_BUS_PMU_PEC4_SDR_0_MISS_SELECT, /**< Select sdram0 miss on PEC4*/
362 IX_PERFPROF_ACC_BUS_PMU_PEC4_SDR_1_MISS_SELECT, /**< Select sdram1 miss on PEC4*/
363 IX_PERFPROF_ACC_BUS_PMU_PEC4_SDR_2_MISS_SELECT /**< Select sdram2 miss on PEC4*/
364 } IxPerfProfAccBusPmuEventCounters4;
365
366 /**
367 * @ingroup IxPerfProfAcc
368 *
369 * @enum IxPerfProfAccBusPmuEventCounters5
370 *
371 * @brief Type of bus pmu events supported on PEC 5.
372 *
373 * Lists all bus pmu events.
374 */
375 typedef enum
376 {
377 IX_PERFPROF_ACC_BUS_PMU_PEC5_SOUTH_ABB_GRANT_SELECT = 91, /**< Select south abb grant on PEC5*/
378 IX_PERFPROF_ACC_BUS_PMU_PEC5_SOUTH_ABB_XFER_SELECT, /**< Select south abb transfer on PEC5*/
379 IX_PERFPROF_ACC_BUS_PMU_PEC5_SOUTH_ABB_RETRY_SELECT, /**< Select south abb retry on PEC5*/
380 IX_PERFPROF_ACC_BUS_PMU_PEC5_SOUTH_EXP_SPLIT_SELECT, /**< Select south expansion split on PEC5*/
381 IX_PERFPROF_ACC_BUS_PMU_PEC5_SOUTH_ABB_REQ_SELECT, /**< Select south abb request on PEC5*/
382 IX_PERFPROF_ACC_BUS_PMU_PEC5_SOUTH_ABB_OWN_SELECT, /**< Select south abb own on PEC5*/
383 IX_PERFPROF_ACC_BUS_PMU_PEC5_SOUTH_BUS_IDLE_SELECT, /**< Select south bus idle on PEC5*/
384
385 IX_PERFPROF_ACC_BUS_PMU_PEC5_NORTH_NPEB_GRANT_SELECT, /**< Select north NPEB grant on PEC5*/
386 IX_PERFPROF_ACC_BUS_PMU_PEC5_NORTH_NPEB_XFER_SELECT, /**< Select north NPEB transfer on PEC5*/
387 IX_PERFPROF_ACC_BUS_PMU_PEC5_NORTH_NPEB_RETRY_SELECT, /**< Select north NPEB retry on PEC5*/
388 IX_PERFPROF_ACC_BUS_PMU_PEC5_NORTH_NPEB_REQ_SELECT, /**< Select north NPEB request on PEC5*/
389 IX_PERFPROF_ACC_BUS_PMU_PEC5_NORTH_NPEB_OWN_SELECT, /**< Select north NPEB own on PEC5*/
390 IX_PERFPROF_ACC_BUS_PMU_PEC5_NORTH_NPEB_WRITE_SELECT, /**< Select north NPEB write on PEC5*/
391 IX_PERFPROF_ACC_BUS_PMU_PEC5_NORTH_NPEB_READ_SELECT, /**< Select north NPEB read on PEC5*/
392
393 IX_PERFPROF_ACC_BUS_PMU_PEC5_SDR_4_HIT_SELECT, /**< Select north sdram4 hit on PEC5*/
394 IX_PERFPROF_ACC_BUS_PMU_PEC5_SDR_5_HIT_SELECT, /**< Select north sdram5 hit on PEC5*/
395 IX_PERFPROF_ACC_BUS_PMU_PEC5_SDR_6_HIT_SELECT, /**< Select north sdram6 hit on PEC5*/
396 IX_PERFPROF_ACC_BUS_PMU_PEC5_SDR_7_HIT_SELECT, /**< Select north sdram7 hit on PEC5*/
397 IX_PERFPROF_ACC_BUS_PMU_PEC5_SDR_0_MISS_SELECT, /**< Select north sdram0 miss on PEC5*/
398 IX_PERFPROF_ACC_BUS_PMU_PEC5_SDR_1_MISS_SELECT, /**< Select north sdram1 miss on PEC5*/
399 IX_PERFPROF_ACC_BUS_PMU_PEC5_SDR_2_MISS_SELECT, /**< Select north sdram2 miss on PEC5*/
400 IX_PERFPROF_ACC_BUS_PMU_PEC5_SDR_3_MISS_SELECT /**< Select north sdram3 miss on PEC5*/
401 } IxPerfProfAccBusPmuEventCounters5;
402
403 /**
404 * @ingroup IxPerfProfAcc
405 *
406 * @enum IxPerfProfAccBusPmuEventCounters6
407 *
408 * @brief Type of bus pmu events supported on PEC 6.
409 *
410 * Lists all bus pmu events.
411 */
412 typedef enum
413 {
414 IX_PERFPROF_ACC_BUS_PMU_PEC6_SOUTH_PCI_GRANT_SELECT = 113, /**< Select south pci grant on PEC6*/
415 IX_PERFPROF_ACC_BUS_PMU_PEC6_SOUTH_PCI_XFER_SELECT, /**< Select south pci transfer on PEC6*/
416 IX_PERFPROF_ACC_BUS_PMU_PEC6_SOUTH_PCI_RETRY_SELECT, /**< Select south pci retry on PEC6*/
417 IX_PERFPROF_ACC_BUS_PMU_PEC6_SOUTH_PCI_SPLIT_SELECT, /**< Select south pci split on PEC6*/
418 IX_PERFPROF_ACC_BUS_PMU_PEC6_SOUTH_PCI_REQ_SELECT, /**< Select south pci request on PEC6*/
419 IX_PERFPROF_ACC_BUS_PMU_PEC6_SOUTH_PCI_OWN_SELECT, /**< Select south pci own on PEC6*/
420 IX_PERFPROF_ACC_BUS_PMU_PEC6_SOUTH_BUS_WRITE_SELECT, /**< Select south pci write on PEC6*/
421
422 IX_PERFPROF_ACC_BUS_PMU_PEC6_NORTH_NPEC_GRANT_SELECT, /**< Select north NPEC grant on PEC6*/
423 IX_PERFPROF_ACC_BUS_PMU_PEC6_NORTH_NPEC_XFER_SELECT, /**< Select north NPEC transfer on PEC6*/
424 IX_PERFPROF_ACC_BUS_PMU_PEC6_NORTH_NPEC_RETRY_SELECT, /**< Select north NPEC retry on PEC6*/
425 IX_PERFPROF_ACC_BUS_PMU_PEC6_NORTH_NPEC_REQ_SELECT, /**< Select north NPEC request on PEC6*/
426 IX_PERFPROF_ACC_BUS_PMU_PEC6_NORTH_NPEC_OWN_SELECT, /**< Select north NPEC own on PEC6*/
427 IX_PERFPROF_ACC_BUS_PMU_PEC6_NORTH_NPEB_WRITE_SELECT, /**< Select north NPEB write on PEC6*/
428 IX_PERFPROF_ACC_BUS_PMU_PEC6_NORTH_NPEC_READ_SELECT, /**< Select north NPEC read on PEC6*/
429
430 IX_PERFPROF_ACC_BUS_PMU_PEC6_SDR_5_HIT_SELECT, /**< Select sdram5 hit on PEC6*/
431 IX_PERFPROF_ACC_BUS_PMU_PEC6_SDR_6_HIT_SELECT, /**< Select sdram6 hit on PEC6*/
432 IX_PERFPROF_ACC_BUS_PMU_PEC6_SDR_7_HIT_SELECT, /**< Select sdram7 hit on PEC6*/
433 IX_PERFPROF_ACC_BUS_PMU_PEC6_SDR_0_HIT_SELECT, /**< Select sdram0 hit on PEC6*/
434 IX_PERFPROF_ACC_BUS_PMU_PEC6_SDR_1_MISS_SELECT, /**< Select sdram1 miss on PEC6*/
435 IX_PERFPROF_ACC_BUS_PMU_PEC6_SDR_2_MISS_SELECT, /**< Select sdram2 miss on PEC6*/
436 IX_PERFPROF_ACC_BUS_PMU_PEC6_SDR_3_MISS_SELECT, /**< Select sdram3 miss on PEC6*/
437 IX_PERFPROF_ACC_BUS_PMU_PEC6_SDR_4_MISS_SELECT /**< Select sdram4 miss on PEC6*/
438 } IxPerfProfAccBusPmuEventCounters6;
439
440 /**
441 * @ingroup IxPerfProfAcc
442 *
443 * @enum IxPerfProfAccBusPmuEventCounters7
444 *
445 * @brief Type of bus pmu events supported on PEC 7.
446 *
447 * Lists all bus pmu events.
448 */
449 typedef enum
450 {
451 IX_PERFPROF_ACC_BUS_PMU_PEC7_SOUTH_APB_RETRY_SELECT = 135, /**< Select south apb retry on PEC7*/
452 IX_PERFPROF_ACC_BUS_PMU_PEC7_SOUTH_APB_REQ_SELECT, /**< Select south apb request on PEC7*/
453 IX_PERFPROF_ACC_BUS_PMU_PEC7_SOUTH_APB_OWN_SELECT, /**< Select south apb own on PEC7*/
454 IX_PERFPROF_ACC_BUS_PMU_PEC7_SOUTH_BUS_READ_SELECT, /**< Select south bus read on PEC7*/
455 IX_PERFPROF_ACC_BUS_PMU_PEC7_CYCLE_COUNT_SELECT /**< Select cycle count on PEC7*/
456 } IxPerfProfAccBusPmuEventCounters7;
457
458 /**
459 * @ingroup IxPerfProfAcc
460 *
461 * @enum IxPerfProfAccXscalePmuEvent
462 *
463 * @brief Type of xscale pmu events supported
464 *
465 * Lists all xscale pmu events. The maximum is a default value that the user
466 * should not exceed.
467 */
468 typedef enum
469 {
470 IX_PERFPROF_ACC_XSCALE_PMU_EVENT_CACHE_MISS=0, /**< cache miss*/
471 IX_PERFPROF_ACC_XSCALE_PMU_EVENT_CACHE_INSTRUCTION,/**< cache instruction*/
472 IX_PERFPROF_ACC_XSCALE_PMU_EVENT_STALL, /**< event stall*/
473 IX_PERFPROF_ACC_XSCALE_PMU_EVENT_INST_TLB_MISS, /**< instruction tlb miss*/
474 IX_PERFPROF_ACC_XSCALE_PMU_EVENT_DATA_TLB_MISS, /**< data tlb miss*/
475 IX_PERFPROF_ACC_XSCALE_PMU_EVENT_BRANCH_EXEC, /**< branch executed*/
476 IX_PERFPROF_ACC_XSCALE_PMU_EVENT_BRANCH_MISPREDICT, /**<branch mispredict*/
477 IX_PERFPROF_ACC_XSCALE_PMU_EVENT_INST_EXEC, /**< instruction executed*/
478 IX_PERFPROF_ACC_XSCALE_PMU_EVENT_FULL_EVERYCYCLE, /**<
479 *Stall - data cache
480 *buffers are full.
481 *This event occurs
482 *every cycle where
483 *condition present
484 */
485 IX_PERFPROF_ACC_XSCALE_PMU_EVENT_ONCE, /**<
486 *Stall - data cache buffers are
487 *full.This event occurs once
488 *for each contiguous sequence
489 */
490 IX_PERFPROF_ACC_XSCALE_PMU_EVENT_DATA_CACHE_ACCESS, /**< data cache access*/
491 IX_PERFPROF_ACC_XSCALE_PMU_EVENT_DATA_CACHE_MISS, /**< data cache miss*/
492 IX_PERFPROF_ACC_XSCALE_PMU_EVENT_DATA_CACHE_WRITEBACK, /**<data cache
493 *writeback
494 */
495 IX_PERFPROF_ACC_XSCALE_PMU_EVENT_SW_CHANGE_PC, /**< sw change pc*/
496 IX_PERFPROF_ACC_XSCALE_PMU_EVENT_MAX /**< max value*/
497 } IxPerfProfAccXscalePmuEvent;
498
499 /**
500 * @ingroup IxPerfProfAcc
501 *
502 * @enum IxPerfProfAccStatus
503 *
504 * @brief Invalid Status Definitions
505 *
506 * These status will be used by the APIs to return to the user.
507 */
508 typedef enum
509 {
510 IX_PERFPROF_ACC_STATUS_SUCCESS = IX_SUCCESS, /**< success*/
511 IX_PERFPROF_ACC_STATUS_FAIL = IX_FAIL, /**< fail*/
512 IX_PERFPROF_ACC_STATUS_ANOTHER_UTIL_IN_PROGRESS,/**<another utility in
513 *progress
514 */
515 IX_PERFPROF_ACC_STATUS_XCYCLE_MEASUREMENT_IN_PROGRESS, /**<measurement in
516 *progress
517 */
518 IX_PERFPROF_ACC_STATUS_XCYCLE_NO_BASELINE, /**<no baseline yet*/
519 IX_PERFPROF_ACC_STATUS_XCYCLE_MEASUREMENT_REQUEST_OUT_OF_RANGE, /**<
520 * Measurement chosen
521 * is out of range
522 */
523 IX_PERFPROF_ACC_STATUS_XCYCLE_PRIORITY_SET_FAIL, /**<
524 * Cannot set
525 * task priority
526 */
527 IX_PERFPROF_ACC_STATUS_XCYCLE_THREAD_CREATE_FAIL, /**<
528 * Fail create thread
529 */
530 IX_PERFPROF_ACC_STATUS_XCYCLE_PRIORITY_RESTORE_FAIL, /**<
531 *cannot restore
532 *priority
533 */
534 IX_PERFPROF_ACC_STATUS_XCYCLE_MEASUREMENT_NOT_RUNNING, /**< xcycle not running*/
535 IX_PERFPROF_ACC_STATUS_XSCALE_PMU_NUM_INVALID, /**< invalid number
536 *entered
537 */
538 IX_PERFPROF_ACC_STATUS_XSCALE_PMU_EVENT_INVALID, /**< invalid pmu event*/
539 IX_PERFPROF_ACC_STATUS_XSCALE_PMU_START_NOT_CALLED, /**<a start process
540 *was not called
541 *before attempting
542 *a stop or results
543 *get
544 */
545 IX_PERFPROF_ACC_STATUS_BUS_PMU_MODE_ERROR, /**< invalid mode*/
546 IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC1_ERROR, /**< invalid pec1 entered*/
547 IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC2_ERROR, /**< invalid pec2 entered*/
548 IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC3_ERROR, /**< invalid pec3 entered*/
549 IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC4_ERROR, /**< invalid pec4 entered*/
550 IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC5_ERROR, /**< invalid pec5 entered*/
551 IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC6_ERROR, /**< invalid pec6 entered*/
552 IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC7_ERROR, /**< invalid pec7 entered*/
553 IX_PERFPROF_ACC_STATUS_BUS_PMU_START_NOT_CALLED, /**<a start process
554 *was not called
555 *before attempting
556 *a stop
557 */
558 IX_PERFPROF_ACC_STATUS_COMPONENT_NOT_SUPPORTED /**<Device or OS does not support component*/
559 } IxPerfProfAccStatus;
560
561 /**
562 * @ingroup IxPerfProfAcc
563 *
564 * @enum IxPerfProfAccBusPmuMode
565 *
566 * @brief State selection of counters.
567 *
568 * These states will be used to determine the counters whose values are to be
569 * read.
570 */
571 typedef enum
572 {
573 IX_PERFPROF_ACC_BUS_PMU_MODE_HALT=0, /**< halt state*/
574 IX_PERFPROF_ACC_BUS_PMU_MODE_SOUTH, /**< south state*/
575 IX_PERFPROF_ACC_BUS_PMU_MODE_NORTH, /**< north state*/
576 IX_PERFPROF_ACC_BUS_PMU_MODE_SDRAM /**< SDRAM state*/
577 } IxPerfProfAccBusPmuMode;
578
579 /*
580 * Section for prototypes interface functions
581 */
582
583 /**
584 * @ingroup IxPerfProfAcc
585 *
586 * @fn ixPerfProfAccXscalePmuEventCountStart(
587 BOOL clkCntDiv,
588 UINT32 numEvents,
589 IxPerfProfAccXscalePmuEvent pmuEvent1,
590 IxPerfProfAccXscalePmuEvent pmuEvent2,
591 IxPerfProfAccXscalePmuEvent pmuEvent3,
592 IxPerfProfAccXscalePmuEvent pmuEvent4 )
593 *
594 * @brief This API will start the clock and event counting
595 *
596 * @param clkCntDiv BOOL [in] - enables/disables the clock divider. When
597 * true, the divider is enabled and the clock count will be incremented
598 * by one at each 64th processor clock cycle. When false, the divider
599 * is disabled and the clock count will be incremented at every
600 * processor clock cycle.
601 * @param numEvents UINT32 [in] - the number of PMU events that are to be
602 * monitored as specified by the user. For clock counting only, this
603 * is set to zero.
604 * @param pmuEvent1 @ref IxPerfProfAccXscalePmuEvent [in] - the specific PMU
605 * event to be monitored by counter 1
606 * @param pmuEvent2 @ref IxPerfProfAccXscalePmuEvent [in] - the specific PMU
607 * event to be monitored by counter 2
608 * @param pmuEvent3 @ref IxPerfProfAccXscalePmuEvent [in] - the specific PMU
609 * event to be monitored by counter 3
610 * @param pmuEvent4 @ref IxPerfProfAccXscalePmuEvent [in] - the specific PMU
611 * event to be monitored by counter 4
612 *
613 * This API will start the clock and xscale PMU event counting. Up to
614 * 4 events can be monitored simultaneously. This API has to be called before
615 * ixPerfProfAccXscalePmuEventCountStop can be called.
616 *
617 * @return
618 * - IX_PERFPROF_ACC_STATUS_SUCCESS if clock and events counting are
619 * started successfully
620 * - IX_PERFPROF_ACC_STATUS_FAIL if unable to start the counting
621 * - IX_PERFPROF_ACC_STATUS_XSCALE_PMU_NUM_INVALID if the number of events
622 * specified is out of the valid range
623 * - IX_PERFPROF_ACC_STATUS_XSCALE_PMU_EVENT_INVALID if the value of the PMU
624 * event specified does not exist
625 * - IX_PERFPROF_ACC_STATUS_ANOTHER_UTIL_IN_PROGRESS - another utility is
626 * running
627 *
628 * @li Reentrant : no
629 * @li ISR Callable : no
630 *
631 */
632 PUBLIC IxPerfProfAccStatus
633 ixPerfProfAccXscalePmuEventCountStart(
634 BOOL clkCntDiv,
635 UINT32 numEvents,
636 IxPerfProfAccXscalePmuEvent pmuEvent1,
637 IxPerfProfAccXscalePmuEvent pmuEvent2,
638 IxPerfProfAccXscalePmuEvent pmuEvent3,
639 IxPerfProfAccXscalePmuEvent pmuEvent4 );
640
641 /**
642 * @ingroup IxPerfProfAcc
643 *
644 * @fn ixPerfProfAccXscalePmuEventCountStop (
645 IxPerfProfAccXscalePmuResults *eventCountStopResults)
646 *
647 * @brief This API will stop the clock and event counting
648 *
649 * @param *eventCountStopResults @ref IxPerfProfAccXscalePmuResults [out] - pointer
650 * to struct containing results of counters and their overflow. It is the
651 * users's responsibility to allocate the memory for this pointer.
652 *
653 * This API will stop the clock and xscale PMU events that are being counted.
654 * The results of the clock and events count will be stored in the pointer
655 * allocated by the user. It can only be called once
656 * IxPerfProfAccEventCountStart has been called.
657 *
658 * @return
659 * - IX_PERFPROF_ACC_STATUS_SUCCESS if clock and events counting are
660 * stopped successfully
661 * - IX_PERFPROF_ACC_STATUS_XSCALE_PMU_START_NOT_CALLED if
662 * ixPerfProfAccXscalePmuEventCountStart is not called first.
663 *
664 * @li Reentrant : no
665 * @li ISR Callable : no
666 *
667 */
668
669 PUBLIC IxPerfProfAccStatus
670 ixPerfProfAccXscalePmuEventCountStop(
671 IxPerfProfAccXscalePmuResults *eventCountStopResults);
672
673 /**
674 * @ingroup IxPerfProfAcc
675 *
676 * @fn ixPerfProfAccXscalePmuTimeSampStart(
677 UINT32 samplingRate,
678 BOOL clkCntDiv)
679 *
680 * @brief Starts the time based sampling
681 *
682 * @param samplingRate UINT32 [in] - sampling rate is the number of
683 * clock counts before a counter overflow interrupt is generated,
684 * at which, a sample is taken; the rate specified cannot be greater
685 * than the counter size of 32bits or set to zero.
686 * @param clkCntDiv BOOL [in] - enables/disables the clock divider. When
687 * true, the divider is enabled and the clock count will be incremented
688 * by one at each 64th processor clock cycle. When false, the divider
689 * is disabled and the clock count will be incremented at every
690 * processor clock cycle.
691 *
692 * This API starts the time based sampling to determine the frequency with
693 * which lines of code are being executed. Sampling is done at the rate
694 * specified by the user. At each sample,the value of the program counter
695 * is determined. Each of these occurrences are recorded to determine the
696 * frequency with which the Xscale code is being executed. This API has to be
697 * called before ixPerfProfAccXscalePmuTimeSampStop can be called.
698 *
699 * @return
700 * - IX_PERFPROF_ACC_STATUS_SUCCESS if time based sampling is started
701 * successfully
702 * - IX_PERFPROF_ACC_STATUS_FAIL if unable to start the sampling
703 * - IX_PERFPROF_ACC_STATUS_ANOTHER_UTIL_IN_PROGRESS - another utility is
704 * running
705 *
706 * @li Reentrant : no
707 * @li ISR Callable : no
708 *
709 */
710 PUBLIC IxPerfProfAccStatus
711 ixPerfProfAccXscalePmuTimeSampStart(
712 UINT32 samplingRate,
713 BOOL clkCntDiv);
714
715 /**
716 * @ingroup IxPerfProfAcc
717 *
718 * @fn ixPerfProfAccXscalePmuTimeSampStop(
719 IxPerfProfAccXscalePmuEvtCnt *clkCount,
720 IxPerfProfAccXscalePmuSamplePcProfile *timeProfile)
721 *
722 * @brief Stops the time based sampling
723 *
724 * @param *clkCount @ref IxPerfProfAccXscalePmuEvtCnt [out] - pointer to the
725 * struct containing the final clock count and its overflow. It is the
726 * user's responsibility to allocate the memory for this pointer.
727 * @param *timeProfile @ref IxPerfProfAccXscalePmuSamplePcProfile [out] -
728 * pointer to the array of profiles for each program counter value;
729 * the user should set the size of the array to
730 * IX_PERFPROF_ACC_XSCALE_PMU_MAX_PROFILE_SAMPLES. It is the user's
731 * responsibility to allocate the memory for this pointer.
732 *
733 * This API stops the time based sampling. The results are stored in the
734 * pointers allocated by the user. It can only be called once
735 * ixPerfProfAccXscalePmuTimeSampStart has been called.
736 *
737 * @return
738 * - IX_PERFPROF_ACC_STATUS_SUCCESS if time based sampling is stopped
739 * successfully
740 * - IX_PERFPROF_ACC_STATUS_XSCALE_PMU_START_NOT_CALLED if
741 * ixPerfProfAccXscalePmuTimeSampStart not called first
742 *
743 * @li Reentrant : no
744 * @li ISR Callable : no
745 *
746 */
747 PUBLIC IxPerfProfAccStatus
748 ixPerfProfAccXscalePmuTimeSampStop(
749 IxPerfProfAccXscalePmuEvtCnt *clkCount,
750 IxPerfProfAccXscalePmuSamplePcProfile *timeProfile);
751
752 /**
753 * @ingroup IxPerfProfAcc
754 *
755 * @fn ixPerfProfAccXscalePmuEventSampStart(
756 UINT32 numEvents,
757 IxPerfProfAccXscalePmuEvent pmuEvent1,
758 UINT32 eventRate1,
759 IxPerfProfAccXscalePmuEvent pmuEvent2,
760 UINT32 eventRate2,
761 IxPerfProfAccXscalePmuEvent pmuEvent3,
762 UINT32 eventRate3,
763 IxPerfProfAccXscalePmuEvent pmuEvent4,
764 UINT32 eventRate4)
765 *
766 * @brief Starts the event based sampling
767 *
768 * @param numEvents UINT32 [in] - the number of PMU events that are
769 * to be monitored as specified by the user. The value should be
770 * between 1-4 events at a time.
771 * @param pmuEvent1 @ref IxPerfProfAccXscalePmuEvent [in] - the specific PMU
772 * event to be monitored by counter 1
773 * @param eventRate1 UINT32 [in] - sampling rate of counter 1. The rate is
774 * the number of events before a sample taken. If 0 is specified, the
775 * the full counter value (0xFFFFFFFF) is used. The rate must not be
776 * greater than the full counter value.
777 * @param pmuEvent2 @ref IxPerfProfAccXscalePmuEvent [in] - the specific PMU
778 * event to be monitored by counter 2
779 * @param eventRate2 UINT32 [in] - sampling rate of counter 2. The rate is
780 * the number of events before a sample taken. If 0 is specified, the
781 * full counter value (0xFFFFFFFF) is used. The rate must not be
782 * greater than the full counter value.
783 * @param pmuEvent3 @ref IxPerfProfAccXscalePmuEvent [in] - the specific PMU
784 * event to be monitored by counter 3
785 * @param eventRate3 UINT32 [in] - sampling rate of counter 3. The rate is
786 * the number of events before a sample taken. If 0 is specified, the
787 * full counter value (0xFFFFFFFF) is used. The rate must not be
788 * greater than the full counter value.
789 * @param pmuEvent4 @ref IxPerfProfAccXscalePmuEvent [in] - the specific PMU
790 * event to be monitored by counter 4
791 * @param eventRate4 UINT32 [in] - sampling rate of counter 4. The rate is
792 * the number of events before a sample taken. If 0 is specified, the
793 * full counter value (0xFFFFFFFF) is used. The rate must not be
794 * greater than the full counter value.
795 *
796 * Starts the event based sampling to determine the frequency with
797 * which events are being executed. The sampling rate is the number of events,
798 * as specified by the user, before a counter overflow interrupt is
799 * generated. A sample is taken at each counter overflow interrupt. At each
800 * sample,the value of the program counter determines the corresponding
801 * location in the code. Each of these occurrences are recorded to determine
802 * the frequency with which the Xscale code in each event is executed. This API
803 * has to be called before ixPerfProfAccXscalePmuEventSampStop can be called.
804 *
805 * @return
806 * - IX_PERFPROF_ACC_STATUS_SUCCESS if event based sampling is started
807 * successfully
808 * - IX_PERFPROF_ACC_STATUS_FAIL if unable to start the sampling
809 * - IX_PERFPROF_ACC_STATUS_XSCALE_PMU_NUM_INVALID if the number of events
810 * specified is out of the valid range
811 * - IX_PERFPROF_ACC_STATUS_XSCALE_PMU_EVENT_INVALID if the value of the
812 * PMU event specified does not exist
813 * - IX_PERFPROF_ACC_STATUS_ANOTHER_UTIL_IN_PROGRESS - another utility is
814 * running
815 *
816 * @li Reentrant : no
817 * @li ISR Callable : no
818 *
819 */
820 PUBLIC IxPerfProfAccStatus
821 ixPerfProfAccXscalePmuEventSampStart(
822 UINT32 numEvents,
823 IxPerfProfAccXscalePmuEvent pmuEvent1,
824 UINT32 eventRate1,
825 IxPerfProfAccXscalePmuEvent pmuEvent2,
826 UINT32 eventRate2,
827 IxPerfProfAccXscalePmuEvent pmuEvent3,
828 UINT32 eventRate3,
829 IxPerfProfAccXscalePmuEvent pmuEvent4,
830 UINT32 eventRate4);
831
832 /**
833 * @ingroup IxPerfProfAcc
834 *
835 * @fn ixPerfProfAccXscalePmuEventSampStop(
836 IxPerfProfAccXscalePmuSamplePcProfile *eventProfile1,
837 IxPerfProfAccXscalePmuSamplePcProfile *eventProfile2,
838 IxPerfProfAccXscalePmuSamplePcProfile *eventProfile3,
839 IxPerfProfAccXscalePmuSamplePcProfile *eventProfile4)
840 *
841 * @brief Stops the event based sampling
842 *
843 * @param *eventProfile1 @ref IxPerfProfAccXscalePmuSamplePcProfile [out] -
844 * pointer to the array of profiles for each program counter value;
845 * the user should set the size of the array to
846 * IX_PERFPROF_ACC_XSCALE_PMU_MAX_PROFILE_SAMPLES. It is the
847 * users's responsibility to allocate memory for this pointer.
848 * @param *eventProfile2 @ref IxPerfProfAccXscalePmuSamplePcProfile [out] -
849 * pointer to the array of profiles for each program counter value;
850 * the user should set the size of the array to
851 * IX_PERFPROF_ACC_XSCALE_PMU_MAX_PROFILE_SAMPLES. It is the
852 * users's responsibility to allocate memory for this pointer.
853 * @param *eventProfile3 @ref IxPerfProfAccXscalePmuSamplePcProfile [out] -
854 * pointer to the array of profiles for each program counter value;
855 * the user should set the size of the array to
856 * IX_PERFPROF_ACC_XSCALE_PMU_MAX_PROFILE_SAMPLES. It is the
857 * users's responsibility to allocate memory for this pointer.
858 * @param *eventProfile4 @ref IxPerfProfAccXscalePmuSamplePcProfile [out] -
859 * pointer to the array of profiles for each program counter value;
860 * the user should set the size of the array to
861 * IX_PERFPROF_ACC_XSCALE_PMU_MAX_PROFILE_SAMPLES. It is the
862 * users's responsibility to allocate memory for this pointer.
863 *
864 * This API stops the event based sampling. The results are stored in the
865 * pointers allocated by the user. It can only be called once
866 * ixPerfProfAccEventSampStart has been called.
867 *
868 * @return
869 * - IX_PERFPROF_ACC_STATUS_SUCCESS if event based sampling is stopped
870 * successfully
871 * - IX_PERFPROF_ACC_STATUS_XSCALE_PMU_START_NOT_CALLED if
872 * ixPerfProfAccEventSampStart not called first.
873 *
874 * @li Reentrant : no
875 * @li ISR Callable : no
876 *
877 */
878 PUBLIC IxPerfProfAccStatus
879 ixPerfProfAccXscalePmuEventSampStop(
880 IxPerfProfAccXscalePmuSamplePcProfile *eventProfile1,
881 IxPerfProfAccXscalePmuSamplePcProfile *eventProfile2,
882 IxPerfProfAccXscalePmuSamplePcProfile *eventProfile3,
883 IxPerfProfAccXscalePmuSamplePcProfile *eventProfile4);
884
885 /**
886 * @ingroup IxPerfProfAcc
887 *
888 * @fn ixPerfProfAccXscalePmuResultsGet(IxPerfProfAccXscalePmuResults *results)
889 *
890 * @brief Reads the current value of the counters and their overflow
891 *
892 * @param *results @ref IxPerfProfAccXscalePmuResults [out] - pointer to the
893 results struct. It is the user's responsibility to allocate memory
894 for this pointer
895 *
896 * This API reads the value of all four event counters and the clock counter,
897 * and the associated overflows. It does not give results associated with
898 * sampling, i.e. PC and their frequencies. This API can be called at any time
899 * once a process has been started. If it is called before a process has started
900 * the user should be aware that the values it contains are default values and
901 * might be meaningless. The values of the counters are stored in the pointer
902 * allocated by the client.
903 *
904 * @return - none
905 *
906 * @li Reentrant : no
907 * @li ISR Callable : no
908 *
909 */
910 PUBLIC void
911 ixPerfProfAccXscalePmuResultsGet(IxPerfProfAccXscalePmuResults *results);
912
913 /**
914 * @ingroup IxPerfProfAcc
915 *
916 * @fn ixPerfProfAccBusPmuStart(
917 IxPerfProfAccBusPmuMode mode,
918 IxPerfProfAccBusPmuEventCounters1 pecEvent1,
919 IxPerfProfAccBusPmuEventCounters2 pecEvent2,
920 IxPerfProfAccBusPmuEventCounters3 pecEvent3,
921 IxPerfProfAccBusPmuEventCounters4 pecEvent4,
922 IxPerfProfAccBusPmuEventCounters5 pecEvent5,
923 IxPerfProfAccBusPmuEventCounters6 pecEvent6,
924 IxPerfProfAccBusPmuEventCounters7 pecEvent7)
925 * @brief Initializes all the counters and selects events to be monitored.
926 *
927 * Function initializes all the counters and assigns the events associated
928 * with the counters. Users send in the mode and events they want to count.
929 * This API verifies if the combination chosen is appropriate
930 * and sets all the registers accordingly. Selecting HALT mode will result
931 * in an error. User should use ixPerfProfAccBusPmuStop() to HALT.
932 *
933 *
934 * @param mode @ref IxPerfProfAccStateBusPmuMode [in] - Mode selection.
935 * @param pecEvent1 @ref IxPerfProfAccBusPmuEventCounters1 [in] - Event for PEC1.
936 * @param pecEvent2 @ref IxPerfProfAccBusPmuEventCounters2 [in] - Event for PEC2.
937 * @param pecEvent3 @ref IxPerfProfAccBusPmuEventCounters3 [in] - Event for PEC3.
938 * @param pecEvent4 @ref IxPerfProfAccBusPmuEventCounters4 [in] - Event for PEC4.
939 * @param pecEvent5 @ref IxPerfProfAccBusPmuEventCounters5 [in] - Event for PEC5.
940 * @param pecEvent6 @ref IxPerfProfAccBusPmuEventCounters6 [in] - Event for PEC6.
941 * @param pecEvent7 @ref IxPerfProfAccBusPmuEventCounters7 [in] - Event for PEC7.
942 *
943 * @return
944 * - IX_PERFPROF_ACC_STATUS_SUCCESS - Initialization executed
945 * successfully.
946 * - IX_PERFPROF_ACC_STATUS_BUS_PMU_MODE_ERROR - Error in selection of
947 * mode. Only NORTH, SOUTH and SDRAM modes are allowed.
948 * - IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC1_ERROR - Error in selection of
949 * event for PEC1
950 * - IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC2_ERROR - Error in selection of
951 * event for PEC2
952 * - IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC3_ERROR - Error in selection of
953 * event for PEC3
954 * - IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC4_ERROR - Error in selection of
955 * event for PEC4
956 * - IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC5_ERROR - Error in selection of
957 * event for PEC5
958 * - IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC6_ERROR - Error in selection of
959 * event for PEC6
960 * - IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC7_ERROR - Error in selection of
961 * event for PEC7
962 * - IX_PERFPROF_ACC_STATUS_ANOTHER_UTIL_IN_PROGRESS - another utility
963 * is running
964 * - IX_PERFPROF_ACC_STATUS_FAIL - Failed to start because interrupt
965 * service routine fails to bind.
966 *
967 * @li Reentrant : no
968 * @li ISR Callable : no
969 *
970 **/
971 PUBLIC
972 IxPerfProfAccStatus ixPerfProfAccBusPmuStart (
973 IxPerfProfAccBusPmuMode mode,
974 IxPerfProfAccBusPmuEventCounters1 pecEvent1,
975 IxPerfProfAccBusPmuEventCounters2 pecEvent2,
976 IxPerfProfAccBusPmuEventCounters3 pecEvent3,
977 IxPerfProfAccBusPmuEventCounters4 pecEvent4,
978 IxPerfProfAccBusPmuEventCounters5 pecEvent5,
979 IxPerfProfAccBusPmuEventCounters6 pecEvent6,
980 IxPerfProfAccBusPmuEventCounters7 pecEvent7);
981
982 /**
983 * @ingroup IxPerfProfAcc
984 *
985 * @fn ixPerfProfAccBusPmuStop(void)
986 * @brief Stops all counters.
987 *
988 * This function stops all the PECs by setting the halt bit in the ESR.
989 *
990 *
991 * @return
992 * - IX_PERFPROF_ACC_STATUS_SUCCESS - Counters successfully halted.
993 * - IX_PERFPROF_ACC_STATUS_FAIL - Counters could'nt be halted.
994 * - IX_PERFPROF_ACC_STATUS_BUS_PMU_START_NOT_CALLED - the
995 * ixPerfProfAccBusPmuStart() function is not called.
996 *
997 * @li Reentrant : no
998 * @li ISR Callable : no
999 *
1000 **/
1001 PUBLIC IxPerfProfAccStatus
1002 ixPerfProfAccBusPmuStop (void);
1003
1004 /**
1005 * @ingroup IxPerfProfAcc
1006 *
1007 * @fn ixPerfProfAccBusPmuResultsGet (
1008 IxPerfProfAccBusPmuResults *busPmuResults)
1009 * @brief Gets values of all counters
1010 *
1011 * This function is responsible for getting all the counter values from the
1012 * lower API and putting it into an array for the user.
1013 *
1014 * @param *busPmuResults @ref IxPerfProfAccBusPmuResults [out]
1015 * - Pointer to a structure of arrays to store all counter values.
1016 *
1017 * @return none
1018 *
1019 * @li Reentrant : no
1020 * @li ISR Callable : no
1021 *
1022 **/
1023 PUBLIC void
1024 ixPerfProfAccBusPmuResultsGet (IxPerfProfAccBusPmuResults *BusPmuResults);
1025
1026 /**
1027 * @ingroup IxPerfProfAcc
1028 *
1029 * @fn ixPerfProfAccBusPmuPMSRGet (
1030 UINT32 *pmsrValue)
1031 * @brief Get values of PMSR
1032 *
1033 * This API gets the Previous Master Slave Register
1034 * value and returns it to the calling function. This value indicates
1035 * which master or slave accessed the north, south bus or sdram last.
1036 * The value returned by this function is a 32 bit value and is read
1037 * from location of an offset 0x0024 of the base value.
1038 *
1039 * The PMSR value returned indicate the following:
1040 * <pre>
1041 *
1042 * *************************************************************************************
1043 * * Bit * Name * Description *
1044 * * *
1045 * *************************************************************************************
1046 * * [31:18] *Reserved* *
1047 * *************************************************************************************
1048 * * [17:12] * PSS * Indicates which of the slaves on *
1049 * * * * ARBS was previously *
1050 * * * * accessed by the AHBS. *
1051 * * * * [000001] Expansion Bus *
1052 * * * * [000010] SDRAM Controller *
1053 * * * * [000100] PCI *
1054 * * * * [001000] Queue Manager *
1055 * * * * [010000] AHB-APB Bridge *
1056 * * * * [100000] Reserved *
1057 * *************************************************************************************
1058 * * [11:8] * PSN * Indicates which of the Slaves on *
1059 * * * * ARBN was previously *
1060 * * * * accessed the AHBN. *
1061 * * * * [0001] SDRAM Controller *
1062 * * * * [0010] AHB-AHB Bridge *
1063 * * * * [0100] Reserved *
1064 * * * * [1000] Reserved *
1065 * *************************************************************************************
1066 * * [7:4] * PMS * Indicates which of the Masters on *
1067 * * * * ARBS was previously *
1068 * * * * accessing the AHBS. *
1069 * * * * [0001] Gasket *
1070 * * * * [0010] AHB-AHB Bridge *
1071 * * * * [0100] PCI *
1072 * * * * [1000] APB *
1073 * *************************************************************************************
1074 * * [3:0] * PMN * Indicates which of the Masters on *
1075 * * * * ARBN was previously *
1076 * * * * accessing the AHBN. *
1077 * * * * [0001] NPEA *
1078 * * * * [0010] NPEB *
1079 * * * * [0100] NPEC *
1080 * * * * [1000] Reserved *
1081 * *************************************************************************************
1082 * </pre>
1083 *
1084 * @param *pmsrValue UINT32 [out] - Pointer to return PMSR value. Users need to
1085 * allocate storage for psmrValue.
1086 *
1087 * @return none
1088 *
1089 * @li Reentrant : no
1090 * @li ISR Callable : no
1091 *
1092 **/
1093 PUBLIC void
1094 ixPerfProfAccBusPmuPMSRGet (
1095 UINT32 *pmsrValue);
1096
1097
1098 /**
1099 * The APIs below are specifically used for Xcycle module.
1100 **/
1101
1102 /**
1103 * @ingroup IxPerfProfAcc
1104 *
1105 * @fn ixPerfProfAccXcycleBaselineRun (
1106 UINT32 *numBaselineCycle)
1107 *
1108 * @brief Perform baseline for Xcycle
1109 *
1110 * @param *numBaselineCycle UINT32 [out] - pointer to baseline value after
1111 * calibration. Calling function are responsible for
1112 * allocating memory space for this pointer.
1113 *
1114 * Global Data :
1115 * - None.
1116 *
1117 * This function MUST be run before the Xcycle tool can be used. This
1118 * function must be run immediately when the OS boots up with no other
1119 * addition programs running.
1120 * Addition note : This API will measure the time needed to perform
1121 * a fix amount of CPU instructions (~ 1 second worth of loops) as a
1122 * highest priority task and with interrupt disabled. The time measured
1123 * is known as the baseline - interpreted as the shortest time
1124 * needed to complete the amount of CPU instructions. The baseline is
1125 * returned as unit of time in 66Mhz clock tick.
1126 *
1127 * @return
1128 * - IX_PERFPROF_ACC_STATUS_SUCCESS - successful run, result is returned
1129 * - IX_PERFPROF_ACC_STATUS_XCYCLE_PRIORITY_SET_FAIL - failed to change
1130 * task priority
1131 * - IX_PERFPROF_ACC_STATUS_XCYCLE_PRIORITY_RESTORE_FAIL - failed to
1132 * restore task priority
1133 * - IX_PERFPROF_ACC_STATUS_ANOTHER_UTIL_IN_PROGRESS - another utility
1134 * is running
1135 * - IX_PERFPROF_ACC_STATUS_XCYCLE_MEASUREMENT_IN_PROGRESS - Xcycle
1136 * tool has already started
1137 *
1138 * @li Reentrant : no
1139 * @li ISR Callable : no
1140 *
1141 */
1142 PUBLIC IxPerfProfAccStatus
1143 ixPerfProfAccXcycleBaselineRun(
1144 UINT32 *numBaselineCycle);
1145
1146 /**
1147 * @ingroup IxPerfProfAcc
1148 *
1149 * @fn ixPerfProfAccXcycleStart(
1150 UINT32 numMeasurementsRequested);
1151 *
1152 * @brief Start the measurement
1153 *
1154 * @param numMeasurementsRequested UINT32 [in] - number of measurements
1155 * to perform. Value can be 0 to
1156 * IX_PERFPROF_ACC_XCYCLE_MAX_NUM_OF_MEASUREMENTS.
1157 * 0 indicate continuous measurement.
1158 *
1159 * Global Data :
1160 * - None.
1161 *
1162 *
1163 * Start the measurements immediately.
1164 * numMeasurementsRequested specifies number of measurements to run.
1165 * If numMeasurementsRequested is set to 0, the measurement will
1166 * be performed continuously until IxPerfProfAccXcycleStop()
1167 * is called.
1168 * It is estimated that 1 measurement takes approximately 1 second during
1169 * low CPU utilization, therefore 128 measurement takes approximately 128 sec.
1170 * When CPU utilization is high, the measurement will take longer.
1171 * This function spawn a task the perform the measurement and returns.
1172 * The measurement may continue even if this function returns.
1173 *
1174 * IMPORTANT: Under heavy CPU utilization, the task spawn by this
1175 * function may starve and fail to respond to stop command. User
1176 * may need to kill the task manually in this case.
1177 *
1178 * There are only IX_PERFPROF_ACC_XCYCLE_MAX_NUM_OF_MEASUREMENTS
1179 * storage available so storing is wrapped around if measurements are
1180 * more than IX_PERFPROF_ACC_XCYCLE_MAX_NUM_OF_MEASUREMENTS.
1181 *
1182 *
1183 * @return
1184 * - IX_PERFPROF_ACC_STATUS_SUCCESS - successful start, a thread is created
1185 * in the background to perform measurement.
1186 * - IX_PERFPROF_ACC_STATUS_XCYCLE_PRIORITY_SET_FAIL - failed to set
1187 * task priority
1188 * - IX_PERFPROF_ACC_STATUS_XCYCLE_THREAD_CREATE_FAIL - failed to create
1189 * thread to perform measurement.
1190 * - IX_PERFPROF_ACC_STATUS_XCYCLE_NO_BASELINE - baseline is not available
1191 * - IX_PERFPROF_ACC_STATUS_XCYCLE_MEASUREMENT_REQUEST_OUT_OF_RANGE -
1192 * value is larger than IX_PERFPROF_ACC_XCYCLE_MAX_NUM_OF_MEASUREMENTS
1193 * - IX_PERFPROF_ACC_STATUS_XCYCLE_MEASUREMENT_IN_PROGRESS - Xcycle tool
1194 * has already started
1195 * - IX_PERFPROF_ACC_STATUS_ANOTHER_UTIL_IN_PROGRESS - another utility is
1196 * running
1197 *
1198 * @li Reentrant : no
1199 * @li ISR Callable : no
1200 *
1201 */
1202 PUBLIC IxPerfProfAccStatus
1203 ixPerfProfAccXcycleStart (
1204 UINT32 numMeasurementsRequested);
1205
1206 /**
1207 * @ingroup IxPerfProfAcc
1208 *
1209 * @fn ixPerfProfAccXcycleStop(void);
1210 *
1211 * @brief Stop the Xcycle measurement
1212 *
1213 * @param None
1214 *
1215 * Global Data :
1216 * - None.
1217 *
1218 * Stop Xcycle measurements immediately. If the measurements have stopped
1219 * or not started, return IX_PERFPROF_STATUS_XCYCLE_MEASUREMENT_NOT_RUNNING.
1220 * Note: This function does not stop measurement cold. The measurement thread
1221 * may need a few seconds to complete the last measurement. User needs to use
1222 * ixPerfProfAccXcycleInProgress() to determine if measurement is indeed
1223 * completed.
1224 *
1225 * @return
1226 * - IX_PERFPROF_ACC_STATUS_SUCCESS - successful measurement is stopped
1227 * - IX_PERFPROF_STATUS_XCYCLE_MEASUREMENT_NOT_RUNNING - no measurement running
1228 *
1229 * @li Reentrant : no
1230 * @li ISR Callable : no
1231 *
1232 */
1233 PUBLIC IxPerfProfAccStatus
1234 ixPerfProfAccXcycleStop(void);
1235
1236 /**
1237 * @ingroup IxPerfProfAcc
1238 *
1239 * @fn ixPerfProfAccXcycleResultsGet(
1240 IxPerfProfAccXcycleResults *xcycleResult )
1241 *
1242 * @brief Get the results of Xcycle measurement
1243 *
1244 * @param *xcycleResult @ref IxPerfProfAccXcycleResults [out] - Pointer to
1245 * results of last measurements. Calling function are
1246 * responsible for allocating memory space for this pointer.
1247 *
1248 * Global Data :
1249 * - None.
1250 *
1251 * Retrieve the results of last measurement. User should use
1252 * ixPerfProfAccXcycleInProgress() to check if measurement is completed
1253 * before getting the results.
1254 *
1255 * @return
1256 * - IX_PERFPROF_ACC_STATUS_SUCCESS - successful
1257 * - IX_PERFPROF_ACC_STATUS_FAIL - result is not complete.
1258 * - IX_PERFPROF_ACC_STATUS_XCYCLE_NO_BASELINE - baseline is performed
1259 * - IX_PERFPROF_ACC_STATUS_XCYCLE_MEASUREMENT_IN_PROGRESS - Xcycle
1260 * tool is still running
1261 *
1262 * @li Reentrant : no
1263 * @li ISR Callable : no
1264 *
1265 */
1266 PUBLIC IxPerfProfAccStatus
1267 ixPerfProfAccXcycleResultsGet (
1268 IxPerfProfAccXcycleResults *xcycleResult);
1269
1270 /**
1271 * @ingroup IxPerfProfAcc
1272 *
1273 * @fn ixPerfProfAccXcycleInProgress (void)
1274 *
1275 * @brief Check if Xcycle is running
1276 *
1277 * @param None
1278 * Global Data :
1279 * - None.
1280 *
1281 * Check if Xcycle measuring task is running.
1282 *
1283 * @return
1284 * - true - Xcycle is running
1285 * - false - Xcycle is not running
1286 *
1287 * @li Reentrant : no
1288 * @li ISR Callable : no
1289 *
1290 */
1291 PUBLIC BOOL
1292 ixPerfProfAccXcycleInProgress(void);
1293
1294 #ifdef __linux
1295 /**
1296 * @ingroup IxPerfProfAcc
1297 *
1298 * @fn ixPerfProfAccXscalePmuTimeSampCreateProcFile
1299 *
1300 * @brief Enables proc file to call module function
1301 *
1302 * @param None
1303 *
1304 * Global Data :
1305 * - None.
1306 *
1307 * This function is declared globally to enable /proc directory system to call
1308 * and execute the function when the registered file is called. This function is not meant to
1309 * be called by the user.
1310 *
1311 * @return
1312 * - Length of data written to file.
1313 *
1314 * @li Reentrant : no
1315 * @li ISR Callable : no
1316 *
1317 */
1318 int
1319 ixPerfProfAccXscalePmuTimeSampCreateProcFile (char *buf, char **start, off_t offset,
1320 int count, int *eof, void *data);
1321
1322 /**
1323 * @ingroup IxPerfProfAcc
1324 *
1325 * @fn ixPerfProfAccXscalePmuEventSampCreateProcFile
1326 *
1327 * @brief Enables proc file to call module function
1328 *
1329 * @param None
1330 *
1331 * Global Data :
1332 * - None.
1333 *
1334 * This function is declared globally to enable /proc directory system to call
1335 * and execute the function when the registered file is called. This function is not meant to
1336 * be called by the user.
1337 *
1338 * @return
1339 * - Length of data written to file.
1340 *
1341 * @li Reentrant : no
1342 * @li ISR Callable : no
1343 *
1344 */
1345 int
1346 ixPerfProfAccXscalePmuEventSampCreateProcFile (char *buf, char **start, off_t offset,
1347 int count, int *eof, void *data);
1348
1349
1350 #endif /* ifdef __linux */
1351
1352 #endif /* ndef IXPERFPROFACC_H */
1353
1354 /**
1355 *@} defgroup IxPerfProfAcc
1356 */
1357
1358