blob: 98e67b37419548cf41a08c66e7674c17c82a3269 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
/*
* Performance counters software interface.
*
* Copyright 2007, Broadcom Corporation
* All Rights Reserved.
*
* THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
* KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
* SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
*
* $Id: bcmperf.h,v 1.1.1.1 2008/07/21 09:14:16 james26_jang Exp $
*/
/* essai */
#ifndef _BCMPERF_H_
#define _BCMPERF_H_
/* get cache hits and misses */
#if defined(mips) && defined(BCMPERFSTATS)
#include <hndmips.h>
#define BCMPERF_ENABLE_INSTRCOUNT() hndmips_perf_instrcount_enable()
#define BCMPERF_ENABLE_ICACHE_MISS() hndmips_perf_icache_miss_enable()
#define BCMPERF_ENABLE_ICACHE_HIT() hndmips_perf_icache_hit_enable()
#define BCMPERF_GETICACHE_MISS(x) ((x) = hndmips_perf_read_cache_miss())
#define BCMPERF_GETICACHE_HIT(x) ((x) = hndmips_perf_read_cache_hit())
#define BCMPERF_GETINSTRCOUNT(x) ((x) = hndmips_perf_read_instrcount())
#else
#define BCMPERF_ENABLE_INSTRCOUNT()
#define BCMPERF_ENABLE_ICACHE_MISS()
#define BCMPERF_ENABLE_ICACHE_HIT()
#define BCMPERF_GETICACHE_MISS(x) ((x) = 0)
#define BCMPERF_GETICACHE_HIT(x) ((x) = 0)
#define BCMPERF_GETINSTRCOUNT(x) ((x) = 0)
#endif /* defined(mips) */
#endif /* _BCMPERF_H_ */
|