public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: Mel Gorman <mgorman@suse.de>, Ingo Molnar <mingo@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	SystemTap <systemtap@sourceware.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: systemtap broken by removal of register_timer_hook
Date: Tue, 30 Apr 2013 00:19:00 -0000	[thread overview]
Message-ID: <20130430001858.GF1760@somewhere> (raw)
In-Reply-To: <20130419144655.GD8308@redhat.com>

On Fri, Apr 19, 2013 at 10:46:55AM -0400, Frank Ch. Eigler wrote:
> Hi, Frederic -
> 
> 
> > > How about this?
> > >
> > > Author: Frank Ch. Eigler <fche@redhat.com>
> > > Date:   Wed Apr 3 10:35:21 2013 -0400
> > >
> > >     profiling: add profile_tick tracepoint
> > > [...]
> 
> > It would be better not to tie this to CONFIG_PROFILING.
> > A tracepoint in update_process_times() instead would be great but it's
> > sometimes called several times in a tick from some archs.
> > Probably we need something like:
> > 
> > static inline tick_trace(struct pt_regs *regs)
> > {
> >     trace_timer_tick(regs);
> >     profile_tick(CPU_PROFILING);
> > }
> 
> I looked into this, but found no natural place to define such an
> inline function from which to call into a tracepoint, without having
> to #include the <event/FOO.h> file many times.

You could include it from linux/profile.h or linux/tick.h and
define profile_tick to "{ trace_tick(); __profile_tick()}" .

But in a second thought, using a tracepoint in a general purpose header
resulted in bad circular headers dependency in the past, we had bitter
experiences with trace_softirq_raise for example.

> Nor does it seem
> appropriate to do the identical #define CREATE_TRACE_POINTSw part from
> all the different arch/.../*.c files that may call into that inline.
>
> If you'd like to stick to this idea, please advise further where you
> think the tracepoint definition & declarations should go.
> 
> In the alternative, here is v2 of the patch, just changing the
> tracepoint-printing argument as suggested by jistone.

But your tracepoint still depends on CONFIG_PROFILING and I would
really like to avoid that.

How about creating trace_tick() in include/trace/events/timer.h
and call it from tick_periodic() and tick_sched_handle().

This only leaves the archs that don't support generic clockevents
behind. This should be no big deal, they can integrate this tracepoint
later if they need to.

Thanks.

  reply	other threads:[~2013-04-30  0:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-03  7:50 Mel Gorman
2013-04-03 11:01 ` Frederic Weisbecker
     [not found] ` <CAFTL4hyYezB2ZxM-GJ70VoxOeRSG64V6u+nX2hTuhF30R-GdPg__32168.962484184$1364986928$gmane$org@mail.gmail.com>
2013-04-03 12:29   ` Frank Ch. Eigler
2013-04-03 12:50     ` Frederic Weisbecker
2013-04-03 14:44       ` Frank Ch. Eigler
2013-04-03 18:38         ` Josh Stone
2013-04-04 12:46         ` Frederic Weisbecker
2013-04-19 14:47           ` Frank Ch. Eigler
2013-04-30  0:19             ` Frederic Weisbecker [this message]
2013-04-30 17:27               ` Frank Ch. Eigler
2013-05-06 23:12                 ` Frederic Weisbecker
2013-04-10 11:25         ` Ingo Molnar

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=20130430001858.GF1760@somewhere \
    --to=fweisbec@gmail.com \
    --cc=fche@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@kernel.org \
    --cc=systemtap@sourceware.org \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).