public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "info at kleisauke dot nl" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug runtime/24904] stack_trace struct undefined on kernel 5.2
Date: Wed, 14 Aug 2019 09:42:00 -0000	[thread overview]
Message-ID: <bug-24904-6586-LMgwyuMvrL@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-24904-6586@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=24904

--- Comment #1 from Kleis Auke Wolthuizen <info at kleisauke dot nl> ---
It seems that there is also a problem with regard to
perf_event_create_kernel_counter:

$ stap -v -e 'global s; probe timer.profile { s[backtrace()] <<< 1; } probe end
{ foreach (i in s+) { print_stack(i); printf("\t%d\n", @count(s[i])); } } probe
timer.s(60) { exit(); }' > out.stap-stacks
Pass 1: parsed user script and 488 library scripts using
355536virt/129684res/9428shr/119992data kb, in 190usr/30sys/223real ms.
Pass 2: analyzed script: 3 probes, 7 functions, 1 embed, 1 global using
360024virt/134296res/9564shr/124480data kb, in 20usr/0sys/17real ms.
Pass 3: translated to C into
"/tmp/stapS4JOAT/stap_7a9f78085e38311a1bb8015256b67067_2952_src.c" using
360024virt/134296res/9564shr/124480data kb, in 0usr/0sys/0real ms.
In file included from
/tmp/stapS4JOAT/stap_7a9f78085e38311a1bb8015256b67067_2952_src.c:260:
/usr/share/systemtap/runtime/stack.c:51:14: error: ‘struct stack_trace’
declared inside parameter list will not be visible outside of this definition
or declaration [-Werror]
   51 |       struct stack_trace *trace);
      |              ^~~~~~~~~~~
/usr/share/systemtap/runtime/stack.c: In function ‘_stp_stack_print_fallback’:
/usr/share/systemtap/runtime/stack.c:171:21: error: storage size of ‘trace’
isn’t known
  171 |  struct stack_trace trace;
      |                     ^~~~~
In file included from
/tmp/stapS4JOAT/stap_7a9f78085e38311a1bb8015256b67067_2952_src.c:1159:
/usr/share/systemtap/runtime/linux/perf.c: In function ‘_stp_perf_init’:
/usr/share/systemtap/runtime/linux/perf.c:49:18: error: passing argument 3 of
‘perf_event_create_kernel_counter’ makes pointer from integer without a cast
[-Werror=int-conversion]
   49 |              task->pid,
      |              ~~~~^~~~~
      |                  |
      |                  pid_t {aka int}
In file included from /usr/share/systemtap/runtime/linux/runtime.h:236,
                 from /usr/share/systemtap/runtime/runtime.h:26,
                 from
/tmp/stapS4JOAT/stap_7a9f78085e38311a1bb8015256b67067_2952_src.c:28:
./include/linux/perf_event.h:899:1: note: expected ‘struct task_struct *’ but
argument is of type ‘pid_t’ {aka ‘int’}
  899 | perf_event_create_kernel_counter(struct perf_event_attr *attr,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from
/tmp/stapS4JOAT/stap_7a9f78085e38311a1bb8015256b67067_2952_src.c:1159:
/usr/share/systemtap/runtime/linux/perf.c:44:34: error: too few arguments to
function ‘perf_event_create_kernel_counter’
   44 |      stp->e.t.per_thread_event =
perf_event_create_kernel_counter(&stp->attr,
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/share/systemtap/runtime/linux/runtime.h:236,
                 from /usr/share/systemtap/runtime/runtime.h:26,
                 from
/tmp/stapS4JOAT/stap_7a9f78085e38311a1bb8015256b67067_2952_src.c:28:
./include/linux/perf_event.h:899:1: note: declared here
  899 | perf_event_create_kernel_counter(struct perf_event_attr *attr,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from
/tmp/stapS4JOAT/stap_7a9f78085e38311a1bb8015256b67067_2952_src.c:1159:
/usr/share/systemtap/runtime/linux/perf.c:100:13: error: passing argument 3 of
‘perf_event_create_kernel_counter’ makes pointer from integer without a cast
[-Werror=int-conversion]
  100 |             -1,
      |             ^~
      |             |
      |             int
In file included from /usr/share/systemtap/runtime/linux/runtime.h:236,
                 from /usr/share/systemtap/runtime/runtime.h:26,
                 from
/tmp/stapS4JOAT/stap_7a9f78085e38311a1bb8015256b67067_2952_src.c:28:
./include/linux/perf_event.h:899:1: note: expected ‘struct task_struct *’ but
argument is of type ‘int’
  899 | perf_event_create_kernel_counter(struct perf_event_attr *attr,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from
/tmp/stapS4JOAT/stap_7a9f78085e38311a1bb8015256b67067_2952_src.c:1159:
/usr/share/systemtap/runtime/linux/perf.c:95:15: error: too few arguments to
function ‘perf_event_create_kernel_counter’
   95 |      *event = perf_event_create_kernel_counter(&stp->attr,
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/share/systemtap/runtime/linux/runtime.h:236,
                 from /usr/share/systemtap/runtime/runtime.h:26,
                 from
/tmp/stapS4JOAT/stap_7a9f78085e38311a1bb8015256b67067_2952_src.c:28:
./include/linux/perf_event.h:899:1: note: declared here
  899 | perf_event_create_kernel_counter(struct perf_event_attr *attr,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [scripts/Makefile.build:278:
/tmp/stapS4JOAT/stap_7a9f78085e38311a1bb8015256b67067_2952_src.o] Error 1
make: *** [Makefile:1601: _module_/tmp/stapS4JOAT] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compiled C into "stap_7a9f78085e38311a1bb8015256b67067_2952.ko" in
6780usr/1500sys/8282real ms.
Pass 4: compilation failed.  [man error::pass4]

-- 
You are receiving this mail because:
You are the assignee for the bug.

  reply	other threads:[~2019-08-14  9:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-13 15:20 [Bug runtime/24904] New: " info at kleisauke dot nl
2019-08-14  9:42 ` info at kleisauke dot nl [this message]
2019-08-21  1:38 ` [Bug runtime/24904] " fche at redhat dot com
2019-08-21  1:39 ` fche at redhat dot com

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=bug-24904-6586-LMgwyuMvrL@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --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).