From: Steven Rostedt <rostedt@goodmis.org>
To: Namhyung Kim <namhyung.kim@lge.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
Namhyung Kim <namhyung@gmail.com>, Ingo Molnar <mingo@kernel.org>,
Arnaldo Carvalho de Melo <acme@infradead.org>,
Borislav Petkov <bp@alien8.de>, David Ahern <dsahern@gmail.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 03/11] parse-events: Get rid of handling concatenation on event_read_print
Date: Mon, 23 Apr 2012 12:33:42 -0400 [thread overview]
Message-ID: <1335198822.28106.105.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <1335157118-14658-4-git-send-email-namhyung.kim@lge.com>
On Mon, 2012-04-23 at 13:58 +0900, Namhyung Kim wrote:
> The concatenation of subsequent DQUOTE'd strings is handled
> by __read_token() already.
>
You missed the point of this concat. It's not connecting "xxx" it is
connecting "xxx" "yyy" into "xxxyyy", as some events do this.
-- Steve
> Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
> ---
> parse-events.c | 16 ----------------
> 1 file changed, 16 deletions(-)
>
> diff --git a/parse-events.c b/parse-events.c
> index 0cd79c5..b4ae313 100644
> --- a/parse-events.c
> +++ b/parse-events.c
> @@ -2695,7 +2695,6 @@ static int event_read_print(struct event_format *event)
> if (read_expect_type(EVENT_DQUOTE, &token) < 0)
> goto fail;
>
> - concat:
> event->print_fmt.format = token;
> event->print_fmt.args = NULL;
>
> @@ -2705,21 +2704,6 @@ static int event_read_print(struct event_format *event)
> if (type == EVENT_NONE)
> return 0;
>
> - /* Handle concatenation of print lines */
> - if (type == EVENT_DQUOTE) {
> - char *cat;
> -
> - cat = malloc_or_die(strlen(event->print_fmt.format) +
> - strlen(token) + 1);
> - strcpy(cat, event->print_fmt.format);
> - strcat(cat, token);
> - free_token(token);
> - free_token(event->print_fmt.format);
> - event->print_fmt.format = NULL;
> - token = cat;
> - goto concat;
> - }
> -
> if (test_type_token(type, token, EVENT_DELIM, ","))
> goto fail;
>
next prev parent reply other threads:[~2012-04-23 16:33 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-23 4:58 [PATCH 00/11] trace-cmd: libparsevent cleanups - part 2 Namhyung Kim
2012-04-23 4:58 ` [PATCH 01/11] parse-events: Free flag/sym field on failure path Namhyung Kim
2012-04-23 16:21 ` Steven Rostedt
2012-04-24 0:05 ` Namhyung Kim
2012-04-24 1:07 ` [PATCH v2] " Namhyung Kim
2012-04-23 4:58 ` [PATCH 02/11] parse-events: Fix freeing arg on process_dynamic_array() Namhyung Kim
2012-04-23 16:34 ` Steven Rostedt
2012-04-23 4:58 ` [PATCH 03/11] parse-events: Get rid of handling concatenation on event_read_print Namhyung Kim
2012-04-23 16:33 ` Steven Rostedt [this message]
2012-04-24 0:09 ` Namhyung Kim
2012-04-24 0:26 ` Steven Rostedt
2012-04-23 4:58 ` [PATCH 04/11] parse-events: Remove unused arg->dynarray.index Namhyung Kim
2012-04-23 18:35 ` Steven Rostedt
2012-04-23 4:58 ` [PATCH 05/11] parse-events: Use proper function parameter type Namhyung Kim
2012-04-23 18:38 ` Steven Rostedt
2012-04-23 4:58 ` [PATCH 06/11] parse-events: Pass string type argument to args Namhyung Kim
2012-04-23 18:41 ` Steven Rostedt
2012-07-06 11:16 ` [tip:perf/core] tools lib traceevent: " tip-bot for Namhyung Kim
2012-04-23 4:58 ` [PATCH 07/11] parse-events: Do not call add_event() again if allocation failed Namhyung Kim
2012-04-23 18:43 ` Steven Rostedt
2012-07-06 11:17 ` [tip:perf/core] tools lib traceevent: " tip-bot for Namhyung Kim
2012-04-23 4:58 ` [PATCH 08/11] parse-events: Fix some comments Namhyung Kim
2012-04-23 18:47 ` Steven Rostedt
2012-07-06 11:18 ` [tip:perf/core] tools lib traceevent: " tip-bot for Namhyung Kim
2012-04-23 4:58 ` [PATCH 09/11] parse-filter: Check result of malloc() during reading token Namhyung Kim
2012-04-23 18:48 ` Steven Rostedt
2012-04-24 0:15 ` Namhyung Kim
2012-07-06 11:19 ` [tip:perf/core] tools lib traceevent: " tip-bot for Namhyung Kim
2012-04-23 4:58 ` [PATCH 10/11] parse-filter: Fix signature of create_arg_item() Namhyung Kim
2012-04-23 18:57 ` Steven Rostedt
2012-04-23 4:58 ` [PATCH 11/11] parse-filter: Check return value of arg_to_str() Namhyung Kim
2012-04-23 18:59 ` Steven Rostedt
2012-07-06 11:20 ` [tip:perf/core] tools lib traceevent: " tip-bot for Namhyung Kim
2012-04-24 1:29 ` [PATCH 12/11] parse-events: Cleanup realloc use Namhyung Kim
2012-05-15 8:39 ` Namhyung Kim
2012-05-15 8:48 ` Steven Rostedt
2012-05-15 9:32 ` Namhyung Kim
2012-07-06 11:21 ` [tip:perf/core] tools lib traceevent: " tip-bot for Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1335198822.28106.105.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=acme@infradead.org \
--cc=bp@alien8.de \
--cc=dsahern@gmail.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung.kim@lge.com \
--cc=namhyung@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®