OpenCores
URL https://opencores.org/ocsvn/c0or1k/c0or1k/trunk

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [include/] [l4/] [glue/] [arm/] [debug.h] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 drasko
/*
2
 * ARM-specific syscall type accounting.
3
 *
4
 * Copyright (C) 2010 B Labs Ltd.
5
 *
6
 * Author: Bahadir Balban
7
 */
8
 
9
#ifndef __ARM_DEBUG_H__
10
#define __ARM_DEBUG_H__
11
 
12
#include INC_SUBARCH(perfmon.h)
13
 
14
#if defined (CONFIG_DEBUG_ACCOUNTING)
15
 
16
extern struct system_accounting system_accounting;
17
 
18
static inline void
19
system_account_syscall_type(unsigned long swi_address)
20
{
21
        *(((u64 *)&system_accounting.syscalls) +
22
                                  ((swi_address & 0xFF) >> 2)) += 1;
23
}
24
 
25
#else /* End of CONFIG_DEBUG_ACCOUNTING */
26
 
27
static inline void system_account_syscall_type(unsigned long swi_address) { }
28
 
29
#endif /* End of !CONFIG_DEBUG_ACCOUNTING */
30
 
31
 
32
#if defined (CONFIG_DEBUG_PERFMON_KERNEL)
33
 
34
static inline void
35
system_measure_syscall_start(void)
36
{
37
        /* To avoid non-voluntary rescheduling during call */
38
        perfmon_reset_start_cyccnt();
39
}
40
 
41
/* Defined in arm/glue/debug.c */
42
void system_measure_syscall_end(unsigned long swi_address);
43
 
44
#else /* End of CONFIG_DEBUG_PERFMON_KERNEL */
45
 
46
static inline void system_measure_syscall_start(void) { }
47
static inline void system_measure_syscall_end(unsigned long swi_address) { }
48
 
49
#endif /* End of !CONFIG_DEBUG_PERFMON_KERNEL */
50
 
51
#endif /* __ARM_DEBUG_H__ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.