mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
To: Chunyan Zhang <zhang.chunyan@linaro.org>,
	rostedt@goodmis.org, mingo@redhat.com
Cc: mathieu.poirier@linaro.org, serge.broslavsky@linaro.org,
	broonie@kernel.org, zhang.lyra@gmail.com,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v3 1/4] STM trace event: Adding generic buffer interface driver
Date: Wed, 08 Jul 2015 13:23:21 +0300	[thread overview]
Message-ID: <87zj37lzhi.fsf@ashishki-desk.ger.corp.intel.com> (raw)
In-Reply-To: <cd69b6948462085061f2bd0137596bbea3c1d4e2.1436262902.git.zhang.chunyan@linaro.org>

Chunyan Zhang <zhang.chunyan@linaro.org> writes:

> From: Mathieu Poirier <mathieu.poirier@linaro.org>
>
> This patch adds a driver that models itself as an stm_source and
> who's sole purpose is to export an interface to the rest of the
> kernel.  Once the stm and stm_source have been linked via sysfs,
> everything that is passed to the interface will endup in the STM
> trace engine.
>
> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
> ---
>  drivers/stm/Kconfig           | 11 +++++++++++
>  drivers/stm/Makefile          |  2 ++
>  drivers/stm/stm_trace_event.c | 46 +++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 59 insertions(+)
>  create mode 100644 drivers/stm/stm_trace_event.c
>
> diff --git a/drivers/stm/Kconfig b/drivers/stm/Kconfig
> index 6f2db70..8ead418 100644
> --- a/drivers/stm/Kconfig
> +++ b/drivers/stm/Kconfig
> @@ -25,3 +25,14 @@ config STM_SOURCE_CONSOLE
>  
>  	  If you want to send kernel console messages over STM devices,
>  	  say Y.
> +
> +config STM_TRACE_EVENT
> +	tristate "Redirect/copy the output from kernel trace event to STM engine"
> +	depends on STM
> +	help
> +	  This option can be used to redirect or copy the output from kernel trace
> +	  event to STM engine. Enabling this option will introduce a slight
> +	  timing effect.
> +
> +	  If you want to send kernel trace event messages over STM devices,
> +	  say Y.
> diff --git a/drivers/stm/Makefile b/drivers/stm/Makefile
> index 74baf59..55b152c 100644
> --- a/drivers/stm/Makefile
> +++ b/drivers/stm/Makefile
> @@ -5,3 +5,5 @@ stm_core-y		:= core.o policy.o
>  obj-$(CONFIG_STM_DUMMY)	+= dummy_stm.o
>  
>  obj-$(CONFIG_STM_SOURCE_CONSOLE)	+= console.o
> +
> +obj-$(CONFIG_STM_TRACE_EVENT)	+= stm_trace_event.o
> diff --git a/drivers/stm/stm_trace_event.c b/drivers/stm/stm_trace_event.c
> new file mode 100644
> index 0000000..bc77dae
> --- /dev/null
> +++ b/drivers/stm/stm_trace_event.c
> @@ -0,0 +1,46 @@
> +/*
> + * Simple kernel driver to link kernel trace event and an STM device
> + * Copyright (c) 2015, Linaro Ltd.
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms and conditions of the GNU General Public License,
> + * version 2, as published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope 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.
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/module.h>
> +#include <linux/slab.h>
> +#include <linux/console.h>
> +#include <linux/stm.h>
> +
> +static struct stm_source_data stm_trace_event_data = {
> +	.name		= "stm_trace_event",
> +	.nr_chans	= 1,

One question is: do we want to cram ftrace data from all cpus into one
channel or use a channel per cpu?

Regards,
--
Alex

  reply	other threads:[~2015-07-08 10:23 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-07 10:10 [RFC PATCH v3 0/4] Integration of trace events with System Trace IP blocks Chunyan Zhang
2015-07-07 10:10 ` [RFC PATCH v3 1/4] STM trace event: Adding generic buffer interface driver Chunyan Zhang
2015-07-08 10:23   ` Alexander Shishkin [this message]
2015-07-08 14:15     ` Mathieu Poirier
2015-07-08 12:10   ` Peter Zijlstra
2015-07-08 13:09     ` Alexander Shishkin
2015-07-07 10:10 ` [RFC PATCH v3 2/4] trace: Add an entry for printing trace log to STM Chunyan Zhang
2015-07-07 15:58   ` Steven Rostedt
2015-07-08  8:06     ` Chunyan Zhang
2015-07-07 10:10 ` [RFC PATCH v3 3/4] trace: Introduce trace log output function for STM Chunyan Zhang
2015-07-17 20:48   ` Steven Rostedt
2015-07-07 10:10 ` [RFC PATCH v3 4/4] trace: Trace log handler for logging into STM blocks Chunyan Zhang
2015-07-08 12:31   ` Peter Zijlstra
2015-07-08 13:06     ` Chunyan Zhang
2015-07-08 13:22       ` Ingo Molnar
2015-07-08 13:19     ` Steven Rostedt
2015-07-10  9:01       ` Chunyan Zhang
2015-07-17  5:59       ` Chunyan Zhang
2015-07-17 21:07   ` Steven Rostedt
2015-07-07 11:12 ` [RFC PATCH v3 0/4] Integration of trace events with System Trace IP blocks Alexander Shishkin
2015-07-08  7:42   ` Chunyan Zhang
2015-07-08 10:11     ` Alexander Shishkin

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=87zj37lzhi.fsf@ashishki-desk.ger.corp.intel.com \
    --to=alexander.shishkin@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=serge.broslavsky@linaro.org \
    --cc=zhang.chunyan@linaro.org \
    --cc=zhang.lyra@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®