summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/shell
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-03-06 14:41:24 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-03-06 16:20:00 +0100
commit2bd71d95b6bf2dba738ea95b4fa73d8942f21bee (patch)
treedefc791d13bf767904c102c3087108329f336b6d /cpukit/libmisc/shell
parentscore: Allow NULL for SMP lock name (diff)
downloadrtems-2bd71d95b6bf2dba738ea95b4fa73d8942f21bee.tar.bz2
shell: Add PROFREPORT command
Diffstat (limited to 'cpukit/libmisc/shell')
-rw-r--r--cpukit/libmisc/shell/main_profreport.c43
-rw-r--r--cpukit/libmisc/shell/shellconfig.h6
2 files changed, 49 insertions, 0 deletions
diff --git a/cpukit/libmisc/shell/main_profreport.c b/cpukit/libmisc/shell/main_profreport.c
new file mode 100644
index 0000000000..d6e4c5a843
--- /dev/null
+++ b/cpukit/libmisc/shell/main_profreport.c
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2015 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.org/license/LICENSE.
+ */
+
+#if HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include <stdio.h>
+
+#include <rtems/profiling.h>
+#include <rtems/shell.h>
+#include <rtems/shellconfig.h>
+
+static int rtems_shell_main_profreport(int argc, char **argv)
+{
+ rtems_profiling_report_xml(
+ "Shell",
+ (rtems_profiling_printf) fprintf,
+ stdout,
+ 0,
+ " "
+ );
+
+ return 0;
+}
+
+rtems_shell_cmd_t rtems_shell_PROFREPORT_Command = {
+ .name = "profreport",
+ .usage = "profreport",
+ .topic = "rtems",
+ .command = rtems_shell_main_profreport
+};
diff --git a/cpukit/libmisc/shell/shellconfig.h b/cpukit/libmisc/shell/shellconfig.h
index cc2165b419..2e52a92c2e 100644
--- a/cpukit/libmisc/shell/shellconfig.h
+++ b/cpukit/libmisc/shell/shellconfig.h
@@ -84,6 +84,7 @@ extern rtems_shell_cmd_t rtems_shell_CPUUSE_Command;
extern rtems_shell_cmd_t rtems_shell_TOP_Command;
extern rtems_shell_cmd_t rtems_shell_STACKUSE_Command;
extern rtems_shell_cmd_t rtems_shell_PERIODUSE_Command;
+extern rtems_shell_cmd_t rtems_shell_PROFREPORT_Command;
extern rtems_shell_cmd_t rtems_shell_WKSPACE_INFO_Command;
extern rtems_shell_cmd_t rtems_shell_MALLOC_INFO_Command;
#if RTEMS_NETWORKING
@@ -443,6 +444,11 @@ extern rtems_shell_alias_t * const rtems_shell_Initial_aliases[];
&rtems_shell_PERIODUSE_Command,
#endif
#if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
+ !defined(CONFIGURE_SHELL_NO_COMMAND_PROFREPORT)) || \
+ defined(CONFIGURE_SHELL_COMMAND_PROFREPORT)
+ &rtems_shell_PROFREPORT_Command,
+ #endif
+ #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
!defined(CONFIGURE_SHELL_NO_COMMAND_WKSPACE_INFO)) || \
defined(CONFIGURE_SHELL_COMMAND_WKSPACE_INFO)
&rtems_shell_WKSPACE_INFO_Command,