Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
getdelays.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <poll.h>
#include <string.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/wait.h>
#include <signal.h>
#include <linux/genetlink.h>
#include <linux/taskstats.h>
#include <linux/cgroupstats.h>

Go to the source code of this file.

Data Structures

struct  msgtemplate
 

Macros

#define GENLMSG_DATA(glh)   ((void *)(NLMSG_DATA(glh) + GENL_HDRLEN))
 
#define GENLMSG_PAYLOAD(glh)   (NLMSG_PAYLOAD(glh, 0) - GENL_HDRLEN)
 
#define NLA_DATA(na)   ((void *)((char*)(na) + NLA_HDRLEN))
 
#define NLA_PAYLOAD(len)   (len - NLA_HDRLEN)
 
#define err(code, fmt, arg...)
 
#define PRINTF(fmt, arg...)
 
#define MAX_MSG_SIZE   1024
 
#define MAX_CPUS   32
 
#define average_ms(t, c)   (t / 1000000ULL / (c ? c : 1))
 

Functions

int main (int argc, char *argv[])
 

Variables

int done
 
int rcvbufsz
 
char name [100]
 
int dbg
 
int print_delays
 
int print_io_accounting
 
int print_task_context_switch_counts
 
__u64 stime
 
__u64 utime
 
char cpumask [100+6 *MAX_CPUS]
 

Macro Definition Documentation

#define average_ms (   t,
  c 
)    (t / 1000000ULL / (c ? c : 1))

Definition at line 195 of file getdelays.c.

#define err (   code,
  fmt,
  arg... 
)
Value:
do { \
fprintf(stderr, fmt, ##arg); \
exit(code); \
} while (0)

Definition at line 41 of file getdelays.c.

#define GENLMSG_DATA (   glh)    ((void *)(NLMSG_DATA(glh) + GENL_HDRLEN))

Definition at line 36 of file getdelays.c.

#define GENLMSG_PAYLOAD (   glh)    (NLMSG_PAYLOAD(glh, 0) - GENL_HDRLEN)

Definition at line 37 of file getdelays.c.

#define MAX_CPUS   32

Definition at line 65 of file getdelays.c.

#define MAX_MSG_SIZE   1024

Definition at line 63 of file getdelays.c.

#define NLA_DATA (   na)    ((void *)((char*)(na) + NLA_HDRLEN))

Definition at line 38 of file getdelays.c.

#define NLA_PAYLOAD (   len)    (len - NLA_HDRLEN)

Definition at line 39 of file getdelays.c.

#define PRINTF (   fmt,
  arg... 
)
Value:
{ \
if (dbg) { \
printf(fmt, ##arg); \
} \
}

Definition at line 56 of file getdelays.c.

Function Documentation

int main ( int  argc,
char argv[] 
)

Definition at line 256 of file getdelays.c.

Variable Documentation

Definition at line 73 of file getdelays.c.

int dbg

Definition at line 50 of file getdelays.c.

static void done

Definition at line 47 of file getdelays.c.

char name[100]

Definition at line 49 of file getdelays.c.

int print_delays

Definition at line 51 of file getdelays.c.

int print_io_accounting

Definition at line 52 of file getdelays.c.

int print_task_context_switch_counts

Definition at line 53 of file getdelays.c.

int rcvbufsz

Definition at line 48 of file getdelays.c.

__u64 stime

Definition at line 54 of file getdelays.c.

__u64 utime

Definition at line 54 of file getdelays.c.