Data Structures | Functions | Variables
profstat_cmd.c File Reference

Profiling commands. More...

#include <stdio.h>
#include <getopt.h>
#include <ipxe/command.h>
#include <ipxe/parseopt.h>
#include <usr/profstat.h>

Go to the source code of this file.

Data Structures

struct  profstat_options
 "profstat" options More...


static int profstat_exec (int argc, char **argv)
 The "profstat" command. More...


static struct option_descriptor profstat_opts [] = {}
 "profstat" option list More...
static struct command_descriptor profstat_cmd
 "profstat" command descriptor More...
struct command profstat_commands [] __command
 Profiling commands. More...

Detailed Description

Profiling commands.

Definition in file profstat_cmd.c.

Function Documentation



◆ profstat_exec()

static int profstat_exec ( int  argc,
char **  argv 

The "profstat" command.

argcArgument count
argvArgument list
Return values
rcReturn status code

Definition at line 55 of file profstat_cmd.c.

55  {
56  struct profstat_options opts;
57  int rc;
59  /* Parse options */
60  if ( ( rc = parse_options ( argc, argv, &profstat_cmd, &opts ) ) != 0 )
61  return rc;
63  profstat();
65  return 0;
66 }
struct arbelprm_rc_send_wqe rc
Definition: arbel.h:14
static union @424 opts
"cert<xxx>" option list
int parse_options(int argc, char **argv, struct command_descriptor *cmd, void *opts)
Parse command-line options.
Definition: parseopt.c:447
void profstat(void)
Print profiling statistics.
Definition: profstat.c:40
static struct command_descriptor profstat_cmd
"profstat" command descriptor
Definition: profstat_cmd.c:45
"profstat" options
Definition: profstat_cmd.c:39

References opts, parse_options(), profstat(), profstat_cmd, and rc.

Variable Documentation

◆ profstat_opts

struct option_descriptor profstat_opts[] = {}

"profstat" option list

Definition at line 42 of file profstat_cmd.c.

◆ profstat_cmd

struct command_descriptor profstat_cmd
Initial value:
static struct option_descriptor profstat_opts[]
"profstat" option list
Definition: profstat_cmd.c:42
"profstat" options
Definition: profstat_cmd.c:39
#define COMMAND_DESC(_struct, _options, _min_args, _max_args, _usage)
Construct command descriptor.
Definition: parseopt.h:107
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

"profstat" command descriptor

Definition at line 45 of file profstat_cmd.c.

Referenced by profstat_exec().

◆ __command

struct command profstat_commands [] __command
Initial value:
= {
.name = "profstat",
.exec = profstat_exec,
static int profstat_exec(int argc, char **argv)
The "profstat" command.
Definition: profstat_cmd.c:55

Profiling commands.

Definition at line 69 of file profstat_cmd.c.