4.115
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/test.h> |
---|
20 | #include <rtems/profiling.h> |
---|
21 | |
---|
22 | #if defined(RTEMS_PROFILING) |
---|
23 | static bool report_done; |
---|
24 | |
---|
25 | static rtems_interrupt_lock report_lock = |
---|
26 | RTEMS_INTERRUPT_LOCK_INITIALIZER( "test report" ); |
---|
27 | #endif |
---|
28 | |
---|
29 | void rtems_test_fatal_extension( |
---|
30 | rtems_fatal_source source, |
---|
31 | bool is_internal, |
---|
32 | rtems_fatal_code code |
---|
33 | ) |
---|
34 | { |
---|
35 | #if defined(RTEMS_PROFILING) |
---|
36 | rtems_interrupt_lock_context lock_context; |
---|
37 | |
---|
38 | /* |
---|
39 | * Ensures to report only once on SMP machines and ensures that the report is |
---|
40 | * output completely. |
---|
41 | */ |
---|
42 | rtems_interrupt_lock_acquire( &report_lock, &lock_context ); |
---|
43 | |
---|
44 | if ( !report_done ) { |
---|
45 | report_done = true; |
---|
46 | |
---|
47 | printk( |
---|
48 | "\n*** PROFILING REPORT BEGIN %s ***\n", |
---|
49 | rtems_test_name |
---|
50 | ); |
---|
51 | |
---|
52 | rtems_profiling_report_xml( |
---|
53 | rtems_test_name, |
---|
54 | printk_plugin, |
---|
55 | NULL, |
---|
56 | 1, |
---|
57 | " " |
---|
58 | ); |
---|
59 | |
---|
60 | printk( |
---|
61 | "*** PROFILING REPORT END %s ***\n", |
---|
62 | rtems_test_name |
---|
63 | ); |
---|
64 | } |
---|
65 | |
---|
66 | rtems_interrupt_lock_release( &report_lock, &lock_context ); |
---|
67 | #endif |
---|
68 | |
---|
69 | (void) source; |
---|
70 | (void) is_internal; |
---|
71 | (void) code; |
---|
72 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.