|
ContainerTracer
0.1
|
#include <stdio.h>#include <fcntl.h>#include <string.h>#include <stdlib.h>#include <unistd.h>#include <jemalloc/jemalloc.h>#include <pthread.h>#include <libaio.h>#include <errno.h>#include <signal.h>#include <float.h>#include <sys/mount.h>#include <sys/types.h>#include <sys/stat.h>#include <sys/ioctl.h>#include <sys/time.h>#include <sys/ipc.h>#include <sys/msg.h>#include <sys/shm.h>#include <sys/sem.h>#include <flist.h>#include <trace_replay.h>#include <disk_io.h>
Data Structures | |
| struct | simple_bio |
Macros | |
| #define | REFRESH_SLEEP 1000000 |
| #define | RND(x) ((x > 0) ? (genrand() % (x)) : 0) |
| #define | ARG_QDEPTH 1 |
| #define | ARG_THREAD 2 |
| #define | ARG_OUTPUT 3 |
| #define | ARG_TIMEOUT 4 |
| #define | ARG_REPEAT 5 |
| #define | ARG_DEV 6 |
| #define | ARG_TRACE 7 |
| #define | EXT_ARG_NUM 4 |
| #define | N 624 |
| #define | M 397 |
| #define | MATRIX_A 0x9908b0df /* constant vector a */ |
| #define | UPPER_MASK 0x80000000 /* most significant w-r bits */ |
| #define | LOWER_MASK 0x7fffffff /* least significant r bits */ |
| #define | TEMPERING_MASK_B 0x9d2c5680 |
| #define | TEMPERING_MASK_C 0xefc60000 |
| #define | TEMPERING_SHIFT_U(y) (y >> 11) |
| #define | TEMPERING_SHIFT_S(y) (y << 7) |
| #define | TEMPERING_SHIFT_T(y) (y << 15) |
| #define | TEMPERING_SHIFT_L(y) (y >> 18) |
Functions | |
| void | sgenrand (unsigned long seed) |
| unsigned long | genrand () |
| int | timeval_subtract (struct timeval *result, struct timeval *x, struct timeval *y) |
| static double | time_since_ms (struct timeval *start_tv, struct timeval *stop_tv) |
| static double | time_since (struct timeval *start_tv, struct timeval *stop_tv) |
| void * | allocate_aligned_buffer (size_t size) |
| void | align_sector (struct thread_info_t *t_info, int *blkno, int *bcount) |
| void | update_iostat (struct thread_info_t *t_info, struct io_job *job) |
| void | trace_reset (struct trace_info_t *trace) |
| int | trace_set_eof (struct trace_info_t *trace) |
| int | trace_eof (struct trace_info_t *trace) |
| int | try_trace_reset (struct trace_info_t *trace, struct io_stat_t *io_stat) |
| int | trace_io_get (double *arrival_time, int *devno, int *blkno, int *bcount, int *flags, struct trace_info_t *trace, struct io_stat_t *io_stat) |
| static void | io_done (io_context_t ctx, struct iocb *iocb, long res, long res2) |
| int | make_jobs (struct thread_info_t *t_info, struct iocb **ioq, struct io_job **jobq, int depth) |
| void | wait_arrive (struct thread_info_t *t_info) |
| void | wait_completion (struct thread_info_t *t_info, int cnt) |
| void * | sub_worker (void *threadid) |
| void | print_result (int nr_trace, int nr_thread, FILE *fp, int detail) |
| void | usage_help () |
| int | remove_lastchars (FILE *fp, int len) |
| void | finalize () |
| int | trace_io_put (char *line, struct trace_info_t *trace, int qdepth) |
| void | main_worker () |
| void | synthetic_mix (struct trace_info_t *trace) |
| void | synthetic_gen (struct trace_info_t *trace) |
| void | destroy (pthread_t *threads, int qdepth) |
| void | sig_handler (int signum) |
| void * | trace_loader (void *data) |
| int | main (int argc, char **argv) |
Variables | |
| FILE * | log_fp |
| FILE * | json_fp |
| unsigned int | log_count = 0 |
| struct thread_info_t | th_info [MAX_THREADS] |
| struct trace_info_t | traces [MAX_THREADS] |
| struct total_results | total_results |
| pthread_t | threads [MAX_THREADS] |
| int | qdepth |
| int | cnt = 0 |
| int | cnt2 = 0 |
| int | nr_thread |
| int | nr_trace |
| unsigned int | io_size |
| struct timeval tv_start tv_end tv_result | tv_start2 |
| double | execution_time = 0.0 |
| double | timeout |
| long long | wanted_io_count |
| char | key_pathname [BASE_KEY_PATHNAME_LEN] |
| static unsigned long | mt [N] |
| static int | mti = N + 1 |
| #define ARG_DEV 6 |
| #define ARG_OUTPUT 3 |
| #define ARG_QDEPTH 1 |
| #define ARG_REPEAT 5 |
| #define ARG_THREAD 2 |
| #define ARG_TIMEOUT 4 |
| #define ARG_TRACE 7 |
| #define EXT_ARG_NUM 4 |
| #define LOWER_MASK 0x7fffffff /* least significant r bits */ |
| #define M 397 |
| #define MATRIX_A 0x9908b0df /* constant vector a */ |
| #define N 624 |
| #define REFRESH_SLEEP 1000000 |
| #define RND | ( | x | ) | ((x > 0) ? (genrand() % (x)) : 0) |
| #define TEMPERING_MASK_B 0x9d2c5680 |
| #define TEMPERING_MASK_C 0xefc60000 |
| #define TEMPERING_SHIFT_L | ( | y | ) | (y >> 18) |
| #define TEMPERING_SHIFT_S | ( | y | ) | (y << 7) |
| #define TEMPERING_SHIFT_T | ( | y | ) | (y << 15) |
| #define TEMPERING_SHIFT_U | ( | y | ) | (y >> 11) |
| #define UPPER_MASK 0x80000000 /* most significant w-r bits */ |
| void align_sector | ( | struct thread_info_t * | t_info, |
| int * | blkno, | ||
| int * | bcount | ||
| ) |
| void* allocate_aligned_buffer | ( | size_t | size | ) |
| void destroy | ( | pthread_t * | threads, |
| int | qdepth | ||
| ) |

| void finalize | ( | ) |

| unsigned long genrand | ( | ) |

|
static |
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |

| void main_worker | ( | ) |

| int make_jobs | ( | struct thread_info_t * | t_info, |
| struct iocb ** | ioq, | ||
| struct io_job ** | jobq, | ||
| int | depth | ||
| ) |

| void print_result | ( | int | nr_trace, |
| int | nr_thread, | ||
| FILE * | fp, | ||
| int | detail | ||
| ) |

| int remove_lastchars | ( | FILE * | fp, |
| int | len | ||
| ) |
| void sgenrand | ( | unsigned long | seed | ) |
| void sig_handler | ( | int | signum | ) |

| void* sub_worker | ( | void * | threadid | ) |

| void synthetic_gen | ( | struct trace_info_t * | trace | ) |

| void synthetic_mix | ( | struct trace_info_t * | trace | ) |

|
static |
|
static |
| int timeval_subtract | ( | struct timeval * | result, |
| struct timeval * | x, | ||
| struct timeval * | y | ||
| ) |
| int trace_eof | ( | struct trace_info_t * | trace | ) |
| int trace_io_get | ( | double * | arrival_time, |
| int * | devno, | ||
| int * | blkno, | ||
| int * | bcount, | ||
| int * | flags, | ||
| struct trace_info_t * | trace, | ||
| struct io_stat_t * | io_stat | ||
| ) |

| int trace_io_put | ( | char * | line, |
| struct trace_info_t * | trace, | ||
| int | qdepth | ||
| ) |
| void* trace_loader | ( | void * | data | ) |

| void trace_reset | ( | struct trace_info_t * | trace | ) |
| int trace_set_eof | ( | struct trace_info_t * | trace | ) |
| int try_trace_reset | ( | struct trace_info_t * | trace, |
| struct io_stat_t * | io_stat | ||
| ) |

| void update_iostat | ( | struct thread_info_t * | t_info, |
| struct io_job * | job | ||
| ) |

| void usage_help | ( | ) |
| void wait_arrive | ( | struct thread_info_t * | t_info | ) |

| void wait_completion | ( | struct thread_info_t * | t_info, |
| int | cnt | ||
| ) |

| int cnt = 0 |
| int cnt2 = 0 |
| double execution_time = 0.0 |
| unsigned int io_size |
| FILE* json_fp |
| char key_pathname[BASE_KEY_PATHNAME_LEN] |
| unsigned int log_count = 0 |
| FILE* log_fp |
|
static |
|
static |
| int nr_thread |
| int nr_trace |
| int qdepth |
| struct thread_info_t th_info[MAX_THREADS] |
| pthread_t threads[MAX_THREADS] |
| double timeout |
| struct total_results total_results |
| struct trace_info_t traces[MAX_THREADS] |
| struct timeval tv_start tv_end tv_result tv_start2 |
| long long wanted_io_count |
1.8.13