diff options
author | Jiri Olsa <Jiri Olsa jolsa@redhat.com> | 2012-01-07 11:13:03 +0100 |
---|---|---|
committer | Jiri Olsa <Jiri Olsa jolsa@redhat.com> | 2012-01-07 11:13:03 +0100 |
commit | d6b83af2ca0c27c873fcd6d149b9b5ac8a590848 (patch) | |
tree | 74637880fa3e208c2d94a9d182dfd24ee401e77e | |
parent | 89f0092db75a47fc7db8fcb9d00265c42264619b (diff) | |
download | latrace-d6b83af2ca0c27c873fcd6d149b9b5ac8a590848.tar.gz latrace-d6b83af2ca0c27c873fcd6d149b9b5ac8a590848.tar.xz latrace-d6b83af2ca0c27c873fcd6d149b9b5ac8a590848.zip |
fix
-rw-r--r-- | etc/latrace.d/latrace.conf.in | 4 | ||||
-rw-r--r-- | src/config-bison.y | 30 | ||||
-rw-r--r-- | src/config-flex.l | 5 | ||||
-rw-r--r-- | src/error.c | 8 | ||||
-rw-r--r-- | src/error.h | 28 |
5 files changed, 29 insertions, 46 deletions
diff --git a/etc/latrace.d/latrace.conf.in b/etc/latrace.d/latrace.conf.in index 936c963..b7d6e0a 100644 --- a/etc/latrace.d/latrace.conf.in +++ b/etc/latrace.d/latrace.conf.in @@ -206,9 +206,7 @@ OPTIONS { # RUN run3 { # TYPE REPLAY # -# START SYM sym4 -# START LIB libc -# START NTH 10 +# START sym=sym4,lib=libc,n=4 # # RETURN R1 # ARGS a a a diff --git a/src/config-bison.y b/src/config-bison.y index db1d6bc..45c59b1 100644 --- a/src/config-bison.y +++ b/src/config-bison.y @@ -393,40 +393,28 @@ error_run_def ERR_RETURN list_names_comma ABORT("failed to add run"); } | - -error_go: -ERR_GO NAME list_names_comma +error_run_def ERR_START ERR_N '=' VALUE { - if (lt_error_go(scfg, &error_app_go, &error_app, - strdup($2), 0, 1, 0, 0, &ln_names)) - ABORT("failed to add go"); + error_app_run->start.n = $5; } | -ERR_GO NAME ERR_AUTOMATED list_names_comma +error_run_def ERR_TYPE ERR_SEQ { - if (lt_error_go(scfg, &error_app_go, &error_app, - strdup($2), 0, 1, 1, 0, &ln_names)) - ABORT("failed to add go"); } | -ERR_GO NAME ERR_REPLAY list_names_comma +error_run_def ERR_TYPE ERR_AUTOMATED { - if (lt_error_go(scfg, &error_app_go, &error_app, - strdup($2), 0, 1, 1, 1, &ln_names)) - ABORT("failed to add go"); } | -ERR_GO NAME ERR_N '=' VALUE list_names_comma +error_run_def ERR_TYPE ERR_REPLAY { - if (lt_error_go(scfg, &error_app_go, &error_app, - strdup($2), 0, $5, 0, 0, &ln_names)) - ABORT("failed to add go"); } -| -ERR_GO NAME ERR_START '=' VALUE ERR_N '=' VALUE list_names_comma + +error_go: +ERR_GO NAME list_names_comma { if (lt_error_go(scfg, &error_app_go, &error_app, - strdup($2), $5, $8, 0, 0, &ln_names)) + strdup($2), &ln_names)) ABORT("failed to add go"); } diff --git a/src/config-flex.l b/src/config-flex.l index 03d7a1b..5ff63bc 100644 --- a/src/config-flex.l +++ b/src/config-flex.l @@ -126,9 +126,10 @@ ERROR { BEGIN(error); return ERROR; } <error>PROG { return ERR_PROG; } <error>ARGS { return ERR_ARGS; } <error>N { return ERR_N; } -<error>START { return ERR_START; } -<error>FILTER { return ERR_FILTER; } +<error>TYPE { return ERR_TYPE; } <error>SEQ { return ERR_SEQ; } +<error>AUTOMATED { return ERR_AUTOMATED; } +<error>REPLAY { return ERR_REPLAY; } <error>SIGSEGV { return ERR_SIGSEGV; } <error>AUTOMATED { return ERR_AUTOMATED; } <error>REPLAY { return ERR_REPLAY; } diff --git a/src/error.c b/src/error.c index adf5948..502c100 100644 --- a/src/error.c +++ b/src/error.c @@ -898,9 +898,7 @@ static struct lt_error_app_run *find_run(struct lt_config_app *cfg, int lt_error_go(struct lt_config_app *cfg, struct lt_error_app_go **go, struct lt_error_app *error_app, - char *name, int start, int n, - int automated, int replay, - struct lt_list_head *runs) + char *name, struct lt_list_head *runs) { struct lt_error_app_go *app_go = *go; struct lt_config_ln *ln, *h; @@ -913,11 +911,7 @@ int lt_error_go(struct lt_config_app *cfg, lt_init_list_head(&app_go->head_run); lt_init_list_head(&app_go->list); - app_go->n = n; - app_go->start = start; app_go->name = name; - app_go->automated = automated; - app_go->replay = replay; lt_list_for_each_entry_safe(ln, h, runs, list) { struct lt_error_app_run *run; diff --git a/src/error.h b/src/error.h index e22fe0d..5090749 100644 --- a/src/error.h +++ b/src/error.h @@ -83,22 +83,28 @@ struct lt_error_app_return { struct lt_list_head list_run; }; +struct lt_error_start { + long n; +}; + +enum { + LT_ERROR_RUN_TYPE_SEQ, + LT_ERROR_RUN_TYPE_AUTOMATED, + LT_ERROR_RUN_TYPE_REPLAY, +}; + struct lt_error_app_run { char *name; char **args; - + int type; + struct lt_error_start start; struct lt_list_head head_return; struct lt_list_head list_go; struct lt_list_head list_app; }; struct lt_error_app_go { - int n; - int start; - int automated; - int replay; char *name; - struct lt_list_head head_run; struct lt_list_head list; }; @@ -124,9 +130,7 @@ int lt_error_app(struct lt_config_app *cfg, int lt_error_go(struct lt_config_app *cfg, struct lt_error_app_go **go, struct lt_error_app *error_app, - char *name, int start, int n, - int automated, int replay, - struct lt_list_head *runs); + char *name, struct lt_list_head *runs); int lt_error_run_return(struct lt_config_app *cfg, struct lt_error_app_run **run, struct lt_error_app *error_app, @@ -151,12 +155,10 @@ static inline int lt_error_app(struct lt_config_app *cfg, return -1; } -static inline int lt_error_go(struct lt_config_app *cfg, +static int lt_error_go(struct lt_config_app *cfg, struct lt_error_app_go **go, struct lt_error_app *error_app, - char *name, int start, int n, - int automated, int replay, - struct lt_list_head *runs) + char *name, struct lt_list_head *runs) { return -1; } |