public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: fche@redhat.com (Frank Ch. Eigler)
To: "Paddie O'Brien" <paddieobrien@gmail.com>
Cc: systemtap <systemtap@sourceware.org>
Subject: Re: Probing padzero problem
Date: Tue, 06 Sep 2016 15:34:00 -0000	[thread overview]
Message-ID: <y0mk2ep3uua.fsf@fche.csb> (raw)
In-Reply-To: <CAOK12Db-ZjSN8=+xHqzgAvv1q_hH6gyRinZ-9QaaoNed4PE8Hg@mail.gmail.com> (Paddie O'Brien's message of "Mon, 5 Sep 2016 23:30:36 +0100")


paddieobrien wrote:

> [...]
> # stap -L 'kernel.function("padzero")'
> kernel.function("padzero@fs/binfmt_elf.c:113") $elf_bss:long unsigned int
> But when I try to probe it with:
> probe kernel.function("padzero@fs/binfmt_elf.c:113")
> [...]=
> WARNING: For probing a particular line, use a .statement() probe, not .function
> semantic error: no line records for fs/binfmt_elf.c:113 [man error::dwarf] (try

Sorry, systemtap is misleading you.  tl;dr: use instead: probe
kernel.function("padzero") { }

Systemtap accepts filename:linenumber suffixes for function probes,
but sort of reluctantly, as an ambiguity resolution tool.  People have
confused .statement() and .function() probes many times in the past,
so the warning is there to nudge them away.

It prints the function's declaration file:line in the "stap -l" report
and elsewhere.  But it doesn't compare incoming file:line values
against the declarations, only against (statement-oriented) line
records.  Thus it doesn't find a match (because there is no statement
on that first declaration line), and gives the silly error.

Systemtap should perhaps not list the file:line number in stap -l output.
Systemtap should definitely accept the declaration file:line suffix for
a function probe.

- FChE

      reply	other threads:[~2016-09-06 15:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-05 22:30 Paddie O'Brien
2016-09-06 15:34 ` Frank Ch. Eigler [this message]

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=y0mk2ep3uua.fsf@fche.csb \
    --to=fche@redhat.com \
    --cc=paddieobrien@gmail.com \
    --cc=systemtap@sourceware.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 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).