This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug dyninst/21463] New: stap -t --dyninst fails un-cleanly


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

            Bug ID: 21463
           Summary: stap -t --dyninst fails un-cleanly
           Product: systemtap
           Version: unspecified
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: dyninst
          Assignee: systemtap at sourceware dot org
          Reporter: serhei.public at gmail dot com
  Target Milestone: ---

Encountered this while trying to get some timing info on behaviour of uprobes
vs dyninst function probes, on both git HEAD and release 3.1 (from RPM).

$ stap -t --dyninst -ve 'global counter = 0; probe process.function("*").call {
counter++ } probe end { printf("%d calls\n", counter) }' -c ls

fails to compile the generated client with the following errors:

Pass 1: parsed user script and 61 library scripts using
214144virt/14336res/7540shr/6776data kb, in 40usr/0sys/51real ms.
Pass 2: analyzed script: 262 probes, 0 functions, 0 embeds, 1 global using
217396virt/18552res/8460shr/10028data kb, in 20usr/0sys/23real ms.
Pass 3: translated to C into
"/tmp/stapQDAbpX/stap_51a8b3ab2742c8ba3d6729c1e3f31320_54002_src.c" using
217396virt/18816res/8708shr/10028data kb, in 20usr/140sys/166real ms.
/tmp/stapQDAbpX/stap_51a8b3ab2742c8ba3d6729c1e3f31320_54002_src.c: In function
‘probe_706’:
/tmp/stapQDAbpX/stap_51a8b3ab2742c8ba3d6729c1e3f31320_54002_src.c:142:7: error:
unknown field ‘contention’ specified in initializer
       .contention = global_contended(s___global_counter),
       ^
In file included from /usr/share/systemtap/runtime/common_session_state.h:16:0,
                 from
/tmp/stapQDAbpX/stap_51a8b3ab2742c8ba3d6729c1e3f31320_54002_src.c:107:
/usr/share/systemtap/runtime/dyninst/common_session_state.h:169:33: error:
initialization from incompatible pointer type
[-Werror=incompatible-pointer-types]
 #define global_contended(name)  (&_global_raw(name ## _lock_contention_count))
                                 ^
/tmp/stapQDAbpX/stap_51a8b3ab2742c8ba3d6729c1e3f31320_54002_src.c:142:21: note:
in expansion of macro ‘global_contended’
       .contention = global_contended(s___global_counter),
                     ^~~~~~~~~~~~~~~~
/usr/share/systemtap/runtime/dyninst/common_session_state.h:169:33: note: (near
initialization for ‘locks[0].lock’)
 #define global_contended(name)  (&_global_raw(name ## _lock_contention_count))
                                 ^
/tmp/stapQDAbpX/stap_51a8b3ab2742c8ba3d6729c1e3f31320_54002_src.c:142:21: note:
in expansion of macro ‘global_contended’
       .contention = global_contended(s___global_counter),
                     ^~~~~~~~~~~~~~~~
/usr/share/systemtap/runtime/dyninst/common_session_state.h:169:33: error:
initialized field with side-effects overwritten
[-Werror=override-init-side-effects]
 #define global_contended(name)  (&_global_raw(name ## _lock_contention_count))
                                 ^
/tmp/stapQDAbpX/stap_51a8b3ab2742c8ba3d6729c1e3f31320_54002_src.c:142:21: note:
in expansion of macro ‘global_contended’
       .contention = global_contended(s___global_counter),
                     ^~~~~~~~~~~~~~~~
/usr/share/systemtap/runtime/dyninst/common_session_state.h:169:33: note: (near
initialization for ‘locks[0].lock’)
 #define global_contended(name)  (&_global_raw(name ## _lock_contention_count))
                                 ^
/tmp/stapQDAbpX/stap_51a8b3ab2742c8ba3d6729c1e3f31320_54002_src.c:142:21: note:
in expansion of macro ‘global_contended’
       .contention = global_contended(s___global_counter),
                     ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
WARNING: gcc exited with status: 1
Pass 4: compiled C into "stap_51a8b3ab2742c8ba3d6729c1e3f31320_54002.so" in
110usr/10sys/139real ms.
Pass 4: compilation failed.  [man error::pass4]

For the record:

$ stap --version
Systemtap translator/driver (version 3.1/0.168, rpm 3.1-2.fc25)
Copyright (C) 2005-2017 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
tested kernel versions: 2.6.18 ... 4.10-rc8
enabled features: AVAHI BOOST_STRING_REF DYNINST JAVA PYTHON2 PYTHON3 LIBRPM
LIBSQLITE3 LIBVIRT LIBXML2 NLS NSS READLINE

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]