5
Last change
on this file since 469dc47 was
3380ee8,
checked in by Sebastian Huber <sebastian.huber@…>, on 04/22/14 at 05:46:53
|
score: Use common names for per-CPU variables
Use "cpu" for an arbitrary Per_CPU_Control variable.
Use "cpu_self" for the Per_CPU_Control of the current processor.
Use "cpu_index" for an arbitrary processor index.
Use "cpu_index_self" for the processor index of the current processor.
Use "cpu_count" for the processor count obtained via
_SMP_Get_processor_count().
Use "cpu_max" for the processor maximum obtained by
rtems_configuration_get_maximum_processors().
|
-
Property mode set to
100644
|
File size:
1.0 KB
|
Line | |
---|
1 | /* |
---|
2 | * Copyright (c) 2014 embedded brains GmbH. All rights reserved. |
---|
3 | * |
---|
4 | * embedded brains GmbH |
---|
5 | * Dornierstr. 4 |
---|
6 | * 82178 Puchheim |
---|
7 | * Germany |
---|
8 | * <rtems@embedded-brains.de> |
---|
9 | * |
---|
10 | * The license and distribution terms for this file may be |
---|
11 | * found in the file LICENSE in this distribution or at |
---|
12 | * http://www.rtems.org/license/LICENSE. |
---|
13 | */ |
---|
14 | |
---|
15 | #ifdef HAVE_CONFIG_H |
---|
16 | #include "config.h" |
---|
17 | #endif |
---|
18 | |
---|
19 | #include <rtems/score/profiling.h> |
---|
20 | |
---|
21 | void _Profiling_Outer_most_interrupt_entry_and_exit( |
---|
22 | Per_CPU_Control *cpu, |
---|
23 | CPU_Counter_ticks interrupt_entry_instant, |
---|
24 | CPU_Counter_ticks interrupt_exit_instant |
---|
25 | ) |
---|
26 | { |
---|
27 | #if defined( RTEMS_PROFILING ) |
---|
28 | Per_CPU_Stats *stats = &cpu->Stats; |
---|
29 | CPU_Counter_ticks delta = _CPU_Counter_difference( |
---|
30 | interrupt_exit_instant, |
---|
31 | interrupt_entry_instant |
---|
32 | ); |
---|
33 | |
---|
34 | ++stats->interrupt_count; |
---|
35 | stats->total_interrupt_time += delta; |
---|
36 | |
---|
37 | if ( stats->max_interrupt_time < delta ) { |
---|
38 | stats->max_interrupt_time = delta; |
---|
39 | } |
---|
40 | #else |
---|
41 | (void) cpu; |
---|
42 | (void) interrupt_entry_instant; |
---|
43 | (void) interrupt_exit_instant; |
---|
44 | #endif |
---|
45 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.