All of lore.kernel.org
 help / color / mirror / Atom feed
From: gregkh@linuxfoundation.org (Greg Kroah-Hartman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/3] ARM Coresight: Enhance ETM tracing control
Date: Thu, 5 Dec 2013 12:16:59 -0800	[thread overview]
Message-ID: <20131205201659.GA14539@kroah.com> (raw)
In-Reply-To: <52A0DE42.3080602@codeaurora.org>

On Thu, Dec 05, 2013 at 03:12:50PM -0500, Christopher Covington wrote:
> Hi Greg,
> 
> On 12/04/2013 11:01 PM, Greg Kroah-Hartman wrote:
> > On Wed, Dec 04, 2013 at 10:49:25PM -0500, Adrien Verg? wrote:
> >> 2013/12/4 Greg Kroah-Hartman <gregkh@linuxfoundation.org>:
> >>> How much overhead does the existing tracing code have on ARM?  Is ETM
> >>> still even needed?  Why not just use ETM for the core tracing code
> >>> instead?
> 
> I think support for the Embedded Trace Macrocell is desirable. (Maybe it's not
> necesarily *needed*, but in the same way that graphics and audio aren't
> necessarily needed when using a desktop machine.) Plugging the ETM into the
> core tracing code or maybe into the perf events framework would be
> interesting, but do these patches make that work any more difficult?

Well, these patches were incorrect, so that's not really a valid
question :)

And adding new features to code that is "dead" and should probably be
removed isn't a good idea, as I'm sure you can understand.

> >> Coresight ETM is not just faster than /sys/kernel/debug/tracing, it
> >> provides more detailed and customisable info. For instance, you can
> >> trace every load, store, instruction fetch, along with the number of
> >> cycles taken, with almost zero-overhead.
> > 
> > Can't you already do that with the 'perf' tool the kernel provides
> > without the ETM driver?
> 
> With perf one can get a count of how many instructions have been executed,
> with little overhead, but not the full list of opcodes and addresses.

Is that a limitation of perf on ARM or perf in general?  For some reason
I thought I had seen this using perf on x86, but it's been a while since
I last used it.

> (One can also sample the Program Counter intermittently, which might
> suffice for performance analysis, but probably doesn't for most
> debugging use cases.) I think with perf one can have a handful of
> watchpoints looking at a very few loads and stores, with large
> overhead. As I understand it, ETM can handle arbitrarily large
> regions, with little overhead.

How much work is it to incorportate ETM into the perf framework?  Don't
you think that this is a better thing to do overall, instead of having
duplicating interfaces for the same thing?

thanks,

greg k-h

WARNING: multiple messages have this Message-ID (diff)
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Christopher Covington <cov@codeaurora.org>
Cc: "Adrien Vergé" <adrienverge@gmail.com>,
	"Russell King" <linux@arm.linux.org.uk>,
	"Randy Dunlap" <rdunlap@infradead.org>,
	"Will Deacon" <will.deacon@arm.com>,
	linux-kernel@vger.kernel.org,
	"Ben Dooks" <ben.dooks@codethink.co.uk>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Dietmar Eggemann" <dietmar.eggemann@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	"zhangwei(Jovi)" <jovi.zhangwei@huawei.com>
Subject: Re: [PATCH 0/3] ARM Coresight: Enhance ETM tracing control
Date: Thu, 5 Dec 2013 12:16:59 -0800	[thread overview]
Message-ID: <20131205201659.GA14539@kroah.com> (raw)
In-Reply-To: <52A0DE42.3080602@codeaurora.org>

On Thu, Dec 05, 2013 at 03:12:50PM -0500, Christopher Covington wrote:
> Hi Greg,
> 
> On 12/04/2013 11:01 PM, Greg Kroah-Hartman wrote:
> > On Wed, Dec 04, 2013 at 10:49:25PM -0500, Adrien Vergé wrote:
> >> 2013/12/4 Greg Kroah-Hartman <gregkh@linuxfoundation.org>:
> >>> How much overhead does the existing tracing code have on ARM?  Is ETM
> >>> still even needed?  Why not just use ETM for the core tracing code
> >>> instead?
> 
> I think support for the Embedded Trace Macrocell is desirable. (Maybe it's not
> necesarily *needed*, but in the same way that graphics and audio aren't
> necessarily needed when using a desktop machine.) Plugging the ETM into the
> core tracing code or maybe into the perf events framework would be
> interesting, but do these patches make that work any more difficult?

Well, these patches were incorrect, so that's not really a valid
question :)

And adding new features to code that is "dead" and should probably be
removed isn't a good idea, as I'm sure you can understand.

> >> Coresight ETM is not just faster than /sys/kernel/debug/tracing, it
> >> provides more detailed and customisable info. For instance, you can
> >> trace every load, store, instruction fetch, along with the number of
> >> cycles taken, with almost zero-overhead.
> > 
> > Can't you already do that with the 'perf' tool the kernel provides
> > without the ETM driver?
> 
> With perf one can get a count of how many instructions have been executed,
> with little overhead, but not the full list of opcodes and addresses.

Is that a limitation of perf on ARM or perf in general?  For some reason
I thought I had seen this using perf on x86, but it's been a while since
I last used it.

> (One can also sample the Program Counter intermittently, which might
> suffice for performance analysis, but probably doesn't for most
> debugging use cases.) I think with perf one can have a handful of
> watchpoints looking at a very few loads and stores, with large
> overhead. As I understand it, ETM can handle arbitrarily large
> regions, with little overhead.

How much work is it to incorportate ETM into the perf framework?  Don't
you think that this is a better thing to do overall, instead of having
duplicating interfaces for the same thing?

thanks,

greg k-h

  reply	other threads:[~2013-12-05 20:16 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-04  4:39 [PATCH 0/3] ARM Coresight: Enhance ETM tracing control Adrien Vergé
2013-12-04  4:39 ` Adrien Vergé
2013-12-04  7:04 ` Greg Kroah-Hartman
2013-12-04  7:04   ` Greg Kroah-Hartman
2013-12-04 16:52   ` Adrien Vergé
2013-12-04 16:52     ` Adrien Vergé
2013-12-04 17:07     ` Greg Kroah-Hartman
2013-12-04 17:07       ` Greg Kroah-Hartman
2013-12-04 21:12       ` Adrien Vergé
2013-12-04 21:12         ` Adrien Vergé
2013-12-04 23:02         ` Greg Kroah-Hartman
2013-12-04 23:02           ` Greg Kroah-Hartman
2013-12-05  3:49           ` Adrien Vergé
2013-12-05  3:49             ` Adrien Vergé
2013-12-05  4:01             ` Greg Kroah-Hartman
2013-12-05  4:01               ` Greg Kroah-Hartman
2013-12-05 20:12               ` Christopher Covington
2013-12-05 20:12                 ` Christopher Covington
2013-12-05 20:16                 ` Greg Kroah-Hartman [this message]
2013-12-05 20:16                   ` Greg Kroah-Hartman
2013-12-05 22:45                   ` Christopher Covington
2013-12-05 22:45                     ` Christopher Covington
2013-12-05 23:26                     ` Greg Kroah-Hartman
2013-12-05 23:26                       ` Greg Kroah-Hartman
2013-12-05 23:54                     ` Adrien Vergé
2013-12-05 23:54                       ` Adrien Vergé
2013-12-06  0:06                       ` Greg Kroah-Hartman
2013-12-06  0:06                         ` Greg Kroah-Hartman
2013-12-06  0:23                         ` Russell King - ARM Linux
2013-12-06  0:23                           ` Russell King - ARM Linux

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=20131205201659.GA14539@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.