Root/target/linux/ubicom32/files/arch/ubicom32/oprofile/ipProf.h

1#ifndef __IP_PROF_H__
2#define __IP_PROF_H__
3
4/* This number MUST match what is used in the ultra configuration! */
5#define IPPROFILETIO_MAX_SAMPLES 600
6
7/* Move to .h file used in both; avoid special types */
8struct profile_sample {
9    unsigned int pc; /* PC value */
10    unsigned int parent; /* a5 contents, to find the caller */
11    unsigned char cond_codes; /* for branch prediction */
12    unsigned char thread; /* I-blocked, D-blocked,
13                       4-bit thread number */
14    unsigned short active; /* which threads are active -
15                       for accurate counting */
16    unsigned short blocked; /* which threads are blocked due to
17                       I or D cache misses */
18    unsigned int latency; /* CPU clocks since the last message
19                       dispatch in this thread
20                       (thread 0 only for now) */
21};
22
23
24struct profilenode {
25    struct devtree_node dn;
26    volatile unsigned char enabled; /* Is the tio enabled to
27                       take samples? */
28    volatile unsigned char busy; /* set when the samples
29                       are being read */
30    volatile unsigned int mask; /* Threads that change the MT_EN flag */
31    volatile unsigned short rate; /* What is the sampling rate? */
32    volatile unsigned short head; /* sample taker puts samples here */
33    volatile unsigned short tail; /* packet filler takes samples here */
34    volatile unsigned short count; /* number of valid samples */
35    volatile unsigned short total; /* Total samples */
36    struct profile_sample samples[IPPROFILETIO_MAX_SAMPLES];
37};
38
39#endif
40

Archive Download this file



interactive