public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug runtime/18320] New: ring_buffer.exp error: implicit declaration of function '__get_cpu_var'
@ 2015-04-24 14:28 mcermak at redhat dot com
  2015-12-08 16:00 ` [Bug runtime/18320] " wcohen at redhat dot com
  2023-12-06 20:28 ` wcohen at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: mcermak at redhat dot com @ 2015-04-24 14:28 UTC (permalink / raw)
  To: systemtap

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

            Bug ID: 18320
           Summary: ring_buffer.exp error: implicit declaration of
                    function '__get_cpu_var'
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: runtime
          Assignee: systemtap at sourceware dot org
          Reporter: mcermak at redhat dot com

When running ring_buffer.exp I see a regression on f20. The testcase was
passing with kernel-3.18.9-100.fc20, but with 3.19.3-100.fc20 it fails.
Observed on both i686 and x86_64. Compiler version was gcc version 4.8.3
20140911 (Red Hat 4.8.3-7) in both cases. 

Issue also reproducible with  f21's gcc-4.9.2-6.fc21.x86_64 on top of
3.19.4-200.fc21.x86_64.

Issue observed observed comparing stap git commit d71ab77 (where it passed) to
81e4501 (where it failed). But after attempting to bisect sources I believe the
issue is caused by underlying kernel change.

Full logs available at https://url.corp.redhat.com/374766f. The systemtap.log
fragment:

=======
Pass 3: translated to C into
"/tmp/stapfer5fy/stap_c4bab2ce137fbbf37e5213f24e9d05e7_1669_src.c" using
115700virt/40028res/6448shr/33996data kb, in 0usr/0sys/0real ms.
In file included from /usr/share/systemtap/runtime/transport/transport.c:65:0,
                 from /usr/share/systemtap/runtime/linux/print.c:17,
                 from /usr/share/systemtap/runtime/print.c:17,
                 from /usr/share/systemtap/runtime/runtime_context.h:22,
                 from
/tmp/stapfer5fy/stap_c4bab2ce137fbbf37e5213f24e9d05e7_1669_src.c:65:
/usr/share/systemtap/runtime/transport/ring_buffer.c: In function
'_stp_ring_buffer_disable_cpu':
/usr/share/systemtap/runtime/transport/ring_buffer.c:13:2: error: implicit
declaration of function '__get_cpu_var' [-Werror=implicit-function-declaration]
  local_inc(&__get_cpu_var(_stp_cpu_disabled));
  ^
/usr/share/systemtap/runtime/transport/ring_buffer.c:13:12: error: lvalue
required as unary '&' operand
  local_inc(&__get_cpu_var(_stp_cpu_disabled));
            ^
/usr/share/systemtap/runtime/transport/ring_buffer.c: In function
'_stp_ring_buffer_enable_cpu':
/usr/share/systemtap/runtime/transport/ring_buffer.c:18:12: error: lvalue
required as unary '&' operand
  local_dec(&__get_cpu_var(_stp_cpu_disabled));
            ^
In file included from /usr/share/systemtap/runtime/transport/ring_buffer.c:6:0,
                 from /usr/share/systemtap/runtime/transport/transport.c:65,
                 from /usr/share/systemtap/runtime/linux/print.c:17,
                 from /usr/share/systemtap/runtime/print.c:17,
                 from /usr/share/systemtap/runtime/runtime_context.h:22,
                 from
/tmp/stapfer5fy/stap_c4bab2ce137fbbf37e5213f24e9d05e7_1669_src.c:65:
/usr/share/systemtap/runtime/transport/ring_buffer.c: In function
'_stp_ring_buffer_cpu_disabled':
/usr/share/systemtap/runtime/transport/ring_buffer.c:24:23: error: lvalue
required as unary '&' operand
     return local_read(&__get_cpu_var(_stp_cpu_disabled));
                       ^
./arch/x86/include/asm/local.h:15:42: note: in definition of macro 'local_read'
 #define local_read(l) atomic_long_read(&(l)->a)
                                          ^
In file included from /usr/share/systemtap/runtime/transport/transport.c:65:0,
                 from /usr/share/systemtap/runtime/linux/print.c:17,
                 from /usr/share/systemtap/runtime/print.c:17,
                 from /usr/share/systemtap/runtime/runtime_context.h:22,
                 from
/tmp/stapfer5fy/stap_c4bab2ce137fbbf37e5213f24e9d05e7_1669_src.c:65:
/usr/share/systemtap/runtime/transport/ring_buffer.c:25:1: error: control
reaches end of non-void function [-Werror=return-type]
 }
 ^
cc1: all warnings being treated as errors
make[4]: *** [/tmp/stapfer5fy/stap_c4bab2ce137fbbf37e5213f24e9d05e7_1669_src.o]
Error 1
make[3]: *** [_module_/tmp/stapfer5fy] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compiled C into "stap_c4bab2ce137fbbf37e5213f24e9d05e7_1669.ko" in
590usr/380sys/908real ms.
Pass 4: compilation failed.  [man error::pass4]
FAIL: RING_BUFFER startup (eof)
Executing: kill -INT -24225
testcase ./systemtap.printf/ring_buffer.exp completed in 1 seconds
=======

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug runtime/18320] ring_buffer.exp error: implicit declaration of function '__get_cpu_var'
  2015-04-24 14:28 [Bug runtime/18320] New: ring_buffer.exp error: implicit declaration of function '__get_cpu_var' mcermak at redhat dot com
@ 2015-12-08 16:00 ` wcohen at redhat dot com
  2023-12-06 20:28 ` wcohen at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: wcohen at redhat dot com @ 2015-12-08 16:00 UTC (permalink / raw)
  To: systemtap

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

William Cohen <wcohen at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wcohen at redhat dot com

--- Comment #1 from William Cohen <wcohen at redhat dot com> ---
The __get_cpu_var() define has been removed from newer kernels by the patch
below so __get_cpu_var() use will also need to be removed from
runtime/transport/ring_buffer.c.

author  Christoph Lameter <cl@linux.com>        2014-12-13 00:58:42 (GMT)
committer       Linus Torvalds <torvalds@linux-foundation.org>  2014-12-13
20:42:53 (GMT)
commit  6c51ec4d18d24b2ffa69de5d60bebaeb4f8e2398 (patch)
tree    59f19ea2a7d9e697fc8ca2bf72d35334be01f517 /include/linux/percpu-defs.h
parent  37d469e7673a663cbf38360beb1eaa3224c9d272 (diff)
percpu: remove __get_cpu_var and __raw_get_cpu_var macros
No user is left in the kernel source tree.  Therefore we can drop the
definitions.

This is the final merge of the transition away from __get_cpu_var.  After
this patch the kernel will not build if anyone uses __get_cpu_var.

Signed-off-by: Christoph Lameter <cl@linux.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug runtime/18320] ring_buffer.exp error: implicit declaration of function '__get_cpu_var'
  2015-04-24 14:28 [Bug runtime/18320] New: ring_buffer.exp error: implicit declaration of function '__get_cpu_var' mcermak at redhat dot com
  2015-12-08 16:00 ` [Bug runtime/18320] " wcohen at redhat dot com
@ 2023-12-06 20:28 ` wcohen at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: wcohen at redhat dot com @ 2023-12-06 20:28 UTC (permalink / raw)
  To: systemtap

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

William Cohen <wcohen at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from William Cohen <wcohen at redhat dot com> ---
This code containing __get_cpu_var() reference was removed by git commit
81a7b6f53fc0ddf4203a66637a42bfe715bb1025

Author: Frank Ch. Eigler <fche@redhat.com>  2020-09-14 19:54:04
Committer: Frank Ch. Eigler <fche@redhat.com>  2020-09-17 10:56:25
Parent: 5b701f181c4e5d8fffc067258ab2f6d771e88255 (Update
emacs/systemtap-mode.el for emacs 27)
Child:  4c5bed543b9b8c4b9cc544762afc9810938f88fa (Fix get_user_pages{,_remote}
for 5.9 kernels.)
Branches: master, remotes/origin/master and many more (41)
Follows: release-4.3
Precedes: release-4.4

    deprecate STP_TRANSPORT_VERSION=3 (ring_buffer)

    The non-default ring_buffer transport hasn't even compiled in some
    time, and appears to have no compelling reason to keep the code
    around.  Let's remove the code.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-06 20:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-24 14:28 [Bug runtime/18320] New: ring_buffer.exp error: implicit declaration of function '__get_cpu_var' mcermak at redhat dot com
2015-12-08 16:00 ` [Bug runtime/18320] " wcohen at redhat dot com
2023-12-06 20:28 ` wcohen at redhat dot com

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).