|
ContainerTracer
0.1
|
Implementation of run the trace-replay benchmark.
More...
#include <stdlib.h>#include <errno.h>#include <search.h>#include <assert.h>#include <unistd.h>#include <signal.h>#include <sys/stat.h>#include <sys/types.h>#include <sys/wait.h>#include <sys/syscall.h>#include <json.h>#include <jemalloc/jemalloc.h>#include <generic.h>#include <runner.h>#include <driver/tr-driver.h>#include <log.h>#include <sync.h>#include <trace_replay.h>
Enumerations | |
| enum | { TR_NONE_SCHEDULER = 0, TR_KYBER_SCHEDULER, TR_BFQ_SCHEDULER } |
Functions | |
| static void | tr_kill_handle (int signum) |
| Capture the SIGTERM and deallocate all resources which this process has. More... | |
| static void | __tr_free (void) |
| Deallocate this driver's resources. More... | |
| int | tr_valid_scheduler_test (const char *scheduler) |
| Check the current inputted scheduler text can be supported by the driver. More... | |
| int | tr_has_weight_scheduler (const int scheduler_index) |
Check the parameter's scheduler_index supports weight. More... | |
| int | tr_init (void *object) |
| Initialize the global configuration and per processes configuration. More... | |
| static int | tr_set_cgroup_state (struct tr_info *current) |
| Set the child process to specific control group(cgroup) More... | |
| static int | tr_do_exec (struct tr_info *current) |
Each process trace-replay execute part. More... | |
| int | tr_runner (void) |
Run all processes' trace-replay part. More... | |
| int | tr_get_interval (const char *key, char *buffer) |
Get execution-time results from trace-replay. More... | |
| int | tr_get_total (const char *key, char *buffer) |
Get end-time results from trace-replay. More... | |
| void | tr_free (void) |
| Deallocate resources of this driver. More... | |
Variables | |
| static const char * | tr_valid_scheduler [] |
| Associated table of I/O scheduler. More... | |
| static const int | tr_weight_support_scheduler [] = { TR_BFQ_SCHEDULER } |
| static struct tr_info * | global_info_head = NULL |
Implementation of run the trace-replay benchmark.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
static |
Deallocate this driver's resources.

|
static |
Each process trace-replay execute part.
| [in] | current | The structure which has the current process information. |

| void tr_free | ( | void | ) |
Deallocate resources of this driver.

| int tr_get_interval | ( | const char * | key, |
| char * | buffer | ||
| ) |
Get execution-time results from trace-replay.
| [in] | key | cgroup_id value which specifies the location of data I want to get. |
| [out] | buffer | Data contains the execution-time results based on key. |
log.type for success to get information, negative value for fail to get information. buffer must be allocated memory over and equal INTERVAL_RESULT_STRING_SIZE 
| int tr_get_total | ( | const char * | key, |
| char * | buffer | ||
| ) |
Get end-time results from trace-replay.
| [in] | key | cgroup_id value which specifies the location of data I want to get. |
| [out] | buffer | Data contains the end-time results based on key. |
buffer must be allocated memory over and equal TOTAL_RESULT_STRING_SIZE 
| int tr_has_weight_scheduler | ( | const int | scheduler_index | ) |
Check the parameter's scheduler_index supports weight.
| [in] | scheduler_index | The scheduler's index which is based on tr_valid_scheduler and wants to check. |
| int tr_init | ( | void * | object | ) |
Initialize the global configuration and per processes configuration.
| [in] | object | global runner_config pointer. |

|
static |
Capture the SIGTERM and deallocate all resources which this process has.
| [in] | signum | Current captured signal. |

| int tr_runner | ( | void | ) |
Run all processes' trace-replay part.

|
static |
Set the child process to specific control group(cgroup)
| [in] | current | The structure which has the current process information. |

| int tr_valid_scheduler_test | ( | const char * | scheduler | ) |
Check the current inputted scheduler text can be supported by the driver.
| [in] | scheduler | Inputted scheduler string. |
|
static |
Associated table of I/O scheduler.
|
static |
1.8.13