Index: cpukit/sapi/src/profilingiterate.c
===================================================================
--- cpukit/sapi/src/profilingiterate.c	(revision 350f88dc6e8e5dc86a875796a938529ebbe8d549)
+++ cpukit/sapi/src/profilingiterate.c	(revision f980561ee073a7f24f65ed572852fa96edfa1708)
@@ -18,4 +18,62 @@
 
 #include <rtems/profiling.h>
+#include <rtems/counter.h>
+#include <rtems.h>
+
+#include <string.h>
+
+static void per_cpu_stats_iterate(
+  rtems_profiling_visitor visitor,
+  void *visitor_arg,
+  rtems_profiling_data *data
+)
+{
+#ifdef RTEMS_PROFILING
+  uint32_t n = rtems_smp_get_processor_count();
+  uint32_t i;
+
+  memset(data, 0, sizeof(*data));
+  data->header.type = RTEMS_PROFILING_PER_CPU;
+  for (i = 0; i < n; ++i) {
+    const Per_CPU_Control *per_cpu = _Per_CPU_Get_by_index(i);
+    const Per_CPU_Stats *stats = &per_cpu->Stats;
+    rtems_profiling_per_cpu *per_cpu_data = &data->per_cpu;
+
+    per_cpu_data->processor_index = i;
+
+    per_cpu_data->max_thread_dispatch_disabled_time =
+      rtems_counter_ticks_to_nanoseconds(
+        stats->max_thread_dispatch_disabled_time
+      );
+
+    per_cpu_data->max_interrupt_time =
+      rtems_counter_ticks_to_nanoseconds(stats->max_interrupt_time);
+
+    per_cpu_data->max_interrupt_delay =
+      rtems_counter_ticks_to_nanoseconds(stats->max_interrupt_delay);
+
+    per_cpu_data->thread_dispatch_disabled_count =
+      stats->thread_dispatch_disabled_count;
+
+    per_cpu_data->total_thread_dispatch_disabled_time =
+      rtems_counter_ticks_to_nanoseconds(
+        stats->total_thread_dispatch_disabled_time
+      );
+
+    per_cpu_data->interrupt_count = stats->interrupt_count;
+
+    per_cpu_data->total_interrupt_time =
+      rtems_counter_ticks_to_nanoseconds(
+        stats->total_interrupt_time
+      );
+
+    (*visitor)(visitor_arg, data);
+  }
+#else
+  (void) visitor;
+  (void) visitor_arg;
+  (void) data;
+#endif
+}
 
 void rtems_profiling_iterate(
@@ -24,3 +82,6 @@
 )
 {
+  rtems_profiling_data data;
+
+  per_cpu_stats_iterate(visitor, visitor_arg, &data);
 }
Index: cpukit/score/Makefile.am
===================================================================
--- cpukit/score/Makefile.am	(revision 350f88dc6e8e5dc86a875796a938529ebbe8d549)
+++ cpukit/score/Makefile.am	(revision f980561ee073a7f24f65ed572852fa96edfa1708)
@@ -46,4 +46,5 @@
 include_rtems_score_HEADERS += include/rtems/score/prioritybitmap.h
 include_rtems_score_HEADERS += include/rtems/score/prioritybitmapimpl.h
+include_rtems_score_HEADERS += include/rtems/score/profiling.h
 include_rtems_score_HEADERS += include/rtems/score/rbtree.h
 include_rtems_score_HEADERS += include/rtems/score/rbtreeimpl.h
@@ -332,4 +333,5 @@
     src/assertthreaddispatchingrepressed.c \
     src/interr.c src/isr.c src/wkspace.c src/wkstringduplicate.c
+libscore_a_SOURCES += src/profilingisrentryexit.c
 
 EXTRA_DIST = src/Unlimited.txt
Index: cpukit/score/include/rtems/score/percpu.h
===================================================================
--- cpukit/score/include/rtems/score/percpu.h	(revision 350f88dc6e8e5dc86a875796a938529ebbe8d549)
+++ cpukit/score/include/rtems/score/percpu.h	(revision f980561ee073a7f24f65ed572852fa96edfa1708)
@@ -156,4 +156,76 @@
 
 /**
+ * @brief Per-CPU statistics.
+ */
+typedef struct {
+#if defined( RTEMS_PROFILING )
+  /**
+   * @brief The thread dispatch disabled begin instant in CPU counter ticks.
+   *
+   * This value is used to measure the time of disabled thread dispatching.
+   */
+  CPU_Counter_ticks thread_dispatch_disabled_instant;
+
+  /**
+   * @brief The maximum time of disabled thread dispatching in CPU counter
+   * ticks.
+   */
+  CPU_Counter_ticks max_thread_dispatch_disabled_time;
+
+  /**
+   * @brief The maximum time spent to process a single sequence of nested
+   * interrupts in CPU counter ticks.
+   *
+   * This is the time interval between the change of the interrupt nest level
+   * from zero to one and the change back from one to zero.
+   */
+  CPU_Counter_ticks max_interrupt_time;
+
+  /**
+   * @brief The maximum interrupt delay in CPU counter ticks if supported by
+   * the hardware.
+   */
+  CPU_Counter_ticks max_interrupt_delay;
+
+  /**
+   * @brief Count of times when the thread dispatch disable level changes from
+   * zero to one in thread context.
+   *
+   * This value may overflow.
+   */
+  uint64_t thread_dispatch_disabled_count;
+
+  /**
+   * @brief Total time of disabled thread dispatching in CPU counter ticks.
+   *
+   * The average time of disabled thread dispatching is the total time of
+   * disabled thread dispatching divided by the thread dispatch disabled
+   * count.
+   *
+   * This value may overflow.
+   */
+  uint64_t total_thread_dispatch_disabled_time;
+
+  /**
+   * @brief Count of times when the interrupt nest level changes from zero to
+   * one.
+   *
+   * This value may overflow.
+   */
+  uint64_t interrupt_count;
+
+  /**
+   * @brief Total time of interrupt processing in CPU counter ticks.
+   *
+   * The average time of interrupt processing is the total time of interrupt
+   * processing divided by the interrupt count.
+   *
+   * This value may overflow.
+   */
+  uint64_t total_interrupt_time;
+#endif /* defined( RTEMS_PROFILING ) */
+} Per_CPU_Stats;
+
+/**
  *  @brief Per CPU Core Structure
  *
@@ -237,4 +309,6 @@
     Per_CPU_State state;
   #endif
+
+  Per_CPU_Stats Stats;
 } Per_CPU_Control;
 
Index: cpukit/score/include/rtems/score/profiling.h
===================================================================
--- cpukit/score/include/rtems/score/profiling.h	(revision f980561ee073a7f24f65ed572852fa96edfa1708)
+++ cpukit/score/include/rtems/score/profiling.h	(revision f980561ee073a7f24f65ed572852fa96edfa1708)
@@ -0,0 +1,113 @@
+/**
+ * @file
+ *
+ * @ingroup ScoreProfiling
+ *
+ * @brief Profiling Support API
+ */
+
+/*
+ * Copyright (c) 2014 embedded brains GmbH.  All rights reserved.
+ *
+ *  embedded brains GmbH
+ *  Dornierstr. 4
+ *  82178 Puchheim
+ *  Germany
+ *  <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#ifndef _RTEMS_SCORE_PROFILING
+#define _RTEMS_SCORE_PROFILING
+
+#include <rtems/score/percpu.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/**
+ * @defgroup ScoreProfiling Profiling Support
+ *
+ * @brief Profiling support.
+ *
+ * @{
+ */
+
+static inline void _Profiling_Thread_dispatch_disable(
+  Per_CPU_Control *per_cpu,
+  uint32_t previous_thread_dispatch_disable_level
+)
+{
+#if defined( RTEMS_PROFILING )
+  if ( previous_thread_dispatch_disable_level == 0 ) {
+    Per_CPU_Stats *stats = &per_cpu->Stats;
+
+    stats->thread_dispatch_disabled_instant = _CPU_Counter_read();
+    ++stats->thread_dispatch_disabled_count;
+  }
+#else
+  (void) per_cpu;
+  (void) previous_thread_dispatch_disable_level;
+#endif
+}
+
+static inline void _Profiling_Thread_dispatch_enable(
+  Per_CPU_Control *per_cpu,
+  uint32_t new_thread_dispatch_disable_level
+)
+{
+#if defined( RTEMS_PROFILING )
+  if ( new_thread_dispatch_disable_level == 0 ) {
+    Per_CPU_Stats *stats = &per_cpu->Stats;
+    CPU_Counter_ticks now = _CPU_Counter_read();
+    CPU_Counter_ticks delta = _CPU_Counter_difference(
+      now,
+      stats->thread_dispatch_disabled_instant
+    );
+
+    stats->total_thread_dispatch_disabled_time += delta;
+
+    if ( stats->max_thread_dispatch_disabled_time < delta ) {
+      stats->max_thread_dispatch_disabled_time = delta;
+    }
+  }
+#else
+  (void) per_cpu;
+  (void) new_thread_dispatch_disable_level;
+#endif
+}
+
+static inline void _Profiling_Update_max_interrupt_delay(
+  Per_CPU_Control *per_cpu,
+  CPU_Counter_ticks interrupt_delay
+)
+{
+#if defined( RTEMS_PROFILING )
+  Per_CPU_Stats *stats = &per_cpu->Stats;
+
+  if ( stats->max_interrupt_delay < interrupt_delay ) {
+    stats->max_interrupt_delay = interrupt_delay;
+  }
+#else
+  (void) per_cpu;
+  (void) interrupt_delay;
+#endif
+}
+
+void _Profiling_Outer_most_interrupt_entry_and_exit(
+  Per_CPU_Control *per_cpu,
+  CPU_Counter_ticks interrupt_entry_instant,
+  CPU_Counter_ticks interrupt_exit_instant
+);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* _RTEMS_SCORE_PROFILING */
Index: cpukit/score/include/rtems/score/threaddispatch.h
===================================================================
--- cpukit/score/include/rtems/score/threaddispatch.h	(revision 350f88dc6e8e5dc86a875796a938529ebbe8d549)
+++ cpukit/score/include/rtems/score/threaddispatch.h	(revision f980561ee073a7f24f65ed572852fa96edfa1708)
@@ -17,4 +17,5 @@
 #include <rtems/score/percpu.h>
 #include <rtems/score/smplock.h>
+#include <rtems/score/profiling.h>
 
 #ifdef __cplusplus
@@ -141,10 +142,20 @@
   RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
   {
-    uint32_t level = _Thread_Dispatch_disable_level;
-
-    ++level;
-    _Thread_Dispatch_disable_level = level;
-
-    return level;
+    uint32_t disable_level = _Thread_Dispatch_disable_level;
+#if defined( RTEMS_PROFILING )
+    ISR_Level level;
+
+    _ISR_Disable( level );
+    _Profiling_Thread_dispatch_disable( _Per_CPU_Get(), disable_level );
+#endif
+
+    ++disable_level;
+    _Thread_Dispatch_disable_level = disable_level;
+
+#if defined( RTEMS_PROFILING )
+    _ISR_Enable( level );
+#endif
+
+    return disable_level;
   }
 
@@ -156,10 +167,20 @@
   RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
   {
-    uint32_t level = _Thread_Dispatch_disable_level;
-
-    --level;
-    _Thread_Dispatch_disable_level = level;
-
-    return level;
+    uint32_t disable_level = _Thread_Dispatch_disable_level;
+#if defined( RTEMS_PROFILING )
+    ISR_Level level;
+
+    _ISR_Disable( level );
+#endif
+
+    --disable_level;
+    _Thread_Dispatch_disable_level = disable_level;
+
+#if defined( RTEMS_PROFILING )
+    _Profiling_Thread_dispatch_enable( _Per_CPU_Get(), disable_level );
+    _ISR_Enable( level );
+#endif
+
+    return disable_level;
   }
 #endif /* RTEMS_SMP */
Index: cpukit/score/preinstall.am
===================================================================
--- cpukit/score/preinstall.am	(revision 350f88dc6e8e5dc86a875796a938529ebbe8d549)
+++ cpukit/score/preinstall.am	(revision f980561ee073a7f24f65ed572852fa96edfa1708)
@@ -163,4 +163,8 @@
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/prioritybitmapimpl.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/prioritybitmapimpl.h
+
+$(PROJECT_INCLUDE)/rtems/score/profiling.h: include/rtems/score/profiling.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/profiling.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/profiling.h
 
 $(PROJECT_INCLUDE)/rtems/score/rbtree.h: include/rtems/score/rbtree.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
Index: cpukit/score/src/profilingisrentryexit.c
===================================================================
--- cpukit/score/src/profilingisrentryexit.c	(revision f980561ee073a7f24f65ed572852fa96edfa1708)
+++ cpukit/score/src/profilingisrentryexit.c	(revision f980561ee073a7f24f65ed572852fa96edfa1708)
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2014 embedded brains GmbH.  All rights reserved.
+ *
+ *  embedded brains GmbH
+ *  Dornierstr. 4
+ *  82178 Puchheim
+ *  Germany
+ *  <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+  #include "config.h"
+#endif
+
+#include <rtems/score/profiling.h>
+
+void _Profiling_Outer_most_interrupt_entry_and_exit(
+  Per_CPU_Control *per_cpu,
+  CPU_Counter_ticks interrupt_entry_instant,
+  CPU_Counter_ticks interrupt_exit_instant
+)
+{
+#if defined( RTEMS_PROFILING )
+  Per_CPU_Stats *stats = &per_cpu->Stats;
+  CPU_Counter_ticks delta = _CPU_Counter_difference(
+    interrupt_exit_instant,
+    interrupt_entry_instant
+  );
+
+  ++stats->interrupt_count;
+  stats->total_interrupt_time += delta;
+
+  if ( stats->max_interrupt_time < delta ) {
+    stats->max_interrupt_time = delta;
+  }
+#else
+  (void) per_cpu;
+  (void) interrupt_entry_instant;
+  (void) interrupt_exit_instant;
+#endif
+}
Index: cpukit/score/src/threaddispatch.c
===================================================================
--- cpukit/score/src/threaddispatch.c	(revision 350f88dc6e8e5dc86a875796a938529ebbe8d549)
+++ cpukit/score/src/threaddispatch.c	(revision f980561ee073a7f24f65ed572852fa96edfa1708)
@@ -41,4 +41,5 @@
   per_cpu = _Per_CPU_Get();
   _Assert( per_cpu->thread_dispatch_disable_level == 0 );
+  _Profiling_Thread_dispatch_disable( per_cpu, 0 );
   per_cpu->thread_dispatch_disable_level = 1;
 
@@ -171,4 +172,5 @@
   _Assert( per_cpu->thread_dispatch_disable_level == 1 );
   per_cpu->thread_dispatch_disable_level = 0;
+  _Profiling_Thread_dispatch_enable( per_cpu, 0 );
 
   _Per_CPU_Release_and_ISR_enable( per_cpu, level );
Index: cpukit/score/src/threaddispatchdisablelevel.c
===================================================================
--- cpukit/score/src/threaddispatchdisablelevel.c	(revision 350f88dc6e8e5dc86a875796a938529ebbe8d549)
+++ cpukit/score/src/threaddispatchdisablelevel.c	(revision f980561ee073a7f24f65ed572852fa96edfa1708)
@@ -18,4 +18,5 @@
 #include <rtems/score/threaddispatch.h>
 #include <rtems/score/assert.h>
+#include <rtems/score/profiling.h>
 #include <rtems/score/sysstate.h>
 
@@ -90,4 +91,5 @@
 
   disable_level = self_cpu->thread_dispatch_disable_level;
+  _Profiling_Thread_dispatch_disable( self_cpu, disable_level );
   ++disable_level;
   self_cpu->thread_dispatch_disable_level = disable_level;
@@ -114,4 +116,5 @@
   _Assert( disable_level != 0 || _Giant.owner_cpu == NO_OWNER_CPU );
 
+  _Profiling_Thread_dispatch_enable( self_cpu, disable_level );
   _ISR_Enable_without_giant( isr_level );
 
Index: cpukit/score/src/threadhandler.c
===================================================================
--- cpukit/score/src/threadhandler.c	(revision 350f88dc6e8e5dc86a875796a938529ebbe8d549)
+++ cpukit/score/src/threadhandler.c	(revision f980561ee073a7f24f65ed572852fa96edfa1708)
@@ -154,4 +154,5 @@
 
       per_cpu->thread_dispatch_disable_level = 0;
+      _Profiling_Thread_dispatch_enable( per_cpu, 0 );
 
       _Per_CPU_Release( per_cpu );
Index: cpukit/score/src/threadstartmultitasking.c
===================================================================
--- cpukit/score/src/threadstartmultitasking.c	(revision 350f88dc6e8e5dc86a875796a938529ebbe8d549)
+++ cpukit/score/src/threadstartmultitasking.c	(revision f980561ee073a7f24f65ed572852fa96edfa1708)
@@ -35,4 +35,5 @@
    */
   _Per_CPU_Acquire( self_cpu );
+  _Profiling_Thread_dispatch_disable( self_cpu, 0 );
   self_cpu->thread_dispatch_disable_level = 1;
 #endif
