From f0aad545cf0e7527b817bb296cf50c3f1768cbad Mon Sep 17 00:00:00 2001 From: compudj Date: Wed, 13 Sep 2006 20:16:48 +0000 Subject: [PATCH] usertrace prio git-svn-id: http://ltt.polymtl.ca/svn@2102 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/configure.in | 2 +- ltt/branches/poly/ltt/parser.c | 37 ++++++++++++++++++---------------- ltt/branches/poly/ltt/parser.h | 1 + 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/ltt/branches/poly/configure.in b/ltt/branches/poly/configure.in index 029f511d..a216927a 100644 --- a/ltt/branches/poly/configure.in +++ b/ltt/branches/poly/configure.in @@ -23,7 +23,7 @@ AC_PREREQ(2.57) AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS) #AC_WITH_LTDL # not needed ? -AM_INIT_AUTOMAKE(LinuxTraceToolkitViewer,0.8.59-11092006) +AM_INIT_AUTOMAKE(LinuxTraceToolkitViewer,0.8.60-13092006) AM_CONFIG_HEADER(config.h) AM_PROG_LIBTOOL diff --git a/ltt/branches/poly/ltt/parser.c b/ltt/branches/poly/ltt/parser.c index 2d6b27d5..0ac6f545 100644 --- a/ltt/branches/poly/ltt/parser.c +++ b/ltt/branches/poly/ltt/parser.c @@ -269,7 +269,8 @@ void getEventAttributes(parse_file_t *in, event_t *ev) ev->per_trace = 0; ev->per_tracefile = 0; ev->param_buffer = 0; - ev->no_instrument_function = 0; + ev->no_instrument_function = 0; + ev->high_priority = 0; while(1) { token = getToken(in); @@ -285,28 +286,30 @@ void getEventAttributes(parse_file_t *in, event_t *ev) else if(car == '\"') ev->name = allocAndCopy(getQuotedString(in)); else ev->name = allocAndCopy(getName(in)); } else if(!strcmp("scope", token)) { - getEqual(in); - car = seekNextChar(in); - if(car == EOF) in->error(in,"scope was expected"); + getEqual(in); + car = seekNextChar(in); + if(car == EOF) in->error(in,"scope was expected"); else if(car == '\"') token = getQuotedString(in); else token = getName(in); - if(!strcmp(token, "trace")) ev->per_trace = 1; - else if(!strcmp(token, "tracefile")) ev->per_tracefile = 1; - } else if(!strcmp("param", token)) { - getEqual(in); - car = seekNextChar(in); - if(car == EOF) in->error(in,"parameter type was expected"); + if(!strcmp(token, "trace")) ev->per_trace = 1; + else if(!strcmp(token, "tracefile")) ev->per_tracefile = 1; + } else if(!strcmp("param", token)) { + getEqual(in); + car = seekNextChar(in); + if(car == EOF) in->error(in,"parameter type was expected"); else if(car == '\"') token = getQuotedString(in); else token = getName(in); - if(!strcmp(token, "buffer")) ev->param_buffer = 1; - } else if(!strcmp("attribute", token)) { - getEqual(in); - car = seekNextChar(in); - if(car == EOF) in->error(in,"attribute was expected"); + if(!strcmp(token, "buffer")) ev->param_buffer = 1; + } else if(!strcmp("attribute", token)) { + getEqual(in); + car = seekNextChar(in); + if(car == EOF) in->error(in,"attribute was expected"); else if(car == '\"') token = getQuotedString(in); else token = getName(in); - if(!strcmp(token, "no_instrument_function")) - ev->no_instrument_function = 1; + if(!strcmp(token, "no_instrument_function")) + ev->no_instrument_function = 1; + else if(!strcmp(token, "high_priority")) + ev->high_priority = 1; } } } diff --git a/ltt/branches/poly/ltt/parser.h b/ltt/branches/poly/ltt/parser.h index a447d6db..8fd75743 100644 --- a/ltt/branches/poly/ltt/parser.h +++ b/ltt/branches/poly/ltt/parser.h @@ -136,6 +136,7 @@ typedef struct _event { int per_tracefile; /* Must we log this event in a specific tracefile ? */ int param_buffer; /* For userspace tracing : takes a buffer as parameter? */ int no_instrument_function; + int high_priority; } event_t; typedef struct _facility { -- 2.34.1