41 #include "contiki-conf.h"
44 #include "loader/symbols.h"
50 PROCESS(shell_profile_process,
"Shell 'profile' command");
53 "profile: show aggregate profiling information",
54 &shell_profile_process);
62 #if DETAILED_AGGREGATES
63 for(i = 0; i < aggregates_list_ptr; ++i) {
64 sprintf(buf,
"-- %s: %lu / %u = %lu", aggregates[i].ptr,
66 aggregates[i].episodes,
67 aggregates[i].cycles / aggregates[i].episodes);
71 for(i = 0; i < aggregates_list_ptr; ++i) {
72 sprintf(buf,
"-- %c%c: %lu / %u = %lu",
73 aggregates[i].ptr[0], aggregates[i].ptr[1],
75 aggregates[i].episodes,
76 aggregates[i].cycles / aggregates[i].episodes);
81 sprintf(buf,
"Memory for aggregates: %d * %d = %d\n",
82 (
int)
sizeof(
struct aggregate), aggregates_list_ptr,
83 (
int)
sizeof(
struct aggregate) * aggregates_list_ptr);
89 shell_profile_init(
void)
#define PROCESS_BEGIN()
Define the beginning of a process.
void shell_output(struct shell_command *c, void *data1, int len1, const void *data2, int len2)
Output data from a shell command.
#define PROCESS_THREAD(name, ev, data)
Define the body of a process.
#define PROCESS_END()
Define the end of a process.
void shell_register_command(struct shell_command *c)
Register a command with the shell.
A brief description of what this file is.
#define PROCESS(name, strname)
Declare a process.
#define SHELL_COMMAND(name, command, description, process)
Define a shell command.