pcp
[Top] [All Lists]

pcp updates: dso symvers part 2, brolley merge

To: pcp@xxxxxxxxxxx
Subject: pcp updates: dso symvers part 2, brolley merge
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Thu, 5 Dec 2013 01:44:33 -0500 (EST)
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <1940458205.23961768.1386224737729.JavaMail.root@xxxxxxxxxx>
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>
Thread-index: v5EAhRTvXaqu72j+PVsPenlPchVW6Q==
Thread-topic: pcp updates: dso symvers part 2, brolley merge
Changes committed to git://oss.sgi.com/pcp/pcp.git dev

 debian/libpcp-trace2-dev.install  |    1 
 debian/libpcp3-dev.install        |    1 
 qa/src/GNUlocaldefs               |    2 
 qa/src/exerlock.c                 |    6 
 src/include/pcp/GNUmakefile       |   12 -
 src/include/pcp/impl.h            |  222 ++++++---------------
 src/include/pcp/pmafm.h           |    4 
 src/include/pcp/pmapi.h           |    6 
 src/include/pcp/pmda.h            |    7 
 src/include/pcp/pmiestats.h       |   42 ----
 src/include/pcp/pmtime.h          |    4 
 src/include/pcp/trace.h           |   16 -
 src/include/pcp/trace_dev.h       |    4 
 src/include/pcp/trace_hash.h      |   66 ------
 src/libpcp/src/GNUmakefile        |   20 -
 src/libpcp/src/auxserver.c        |   20 +
 src/libpcp/src/avahi.c            |  395 +++++++++++++++++++++++--------------
 src/libpcp/src/avahi.h            |   13 -
 src/libpcp/src/check-statics      |   12 -
 src/libpcp/src/context.c          |    2 
 src/libpcp/src/derive.c           |    4 
 src/libpcp/src/derive.h           |   23 +-
 src/libpcp/src/derive_fetch.c     |    6 
 src/libpcp/src/desc.c             |    1 
 src/libpcp/src/endian.c           |    1 
 src/libpcp/src/exports            |  399 ++++++++++++++++++++++++++++++++++++++
 src/libpcp/src/fetch.c            |   19 +
 src/libpcp/src/fetchlocal.c       |    1 
 src/libpcp/src/help.c             |    2 
 src/libpcp/src/instance.c         |    2 
 src/libpcp/src/internal.h         |  184 ++++++++++++-----
 src/libpcp/src/lock.c             |   86 +++++---
 src/libpcp/src/logmeta.c          |    2 
 src/libpcp/src/logutil.c          |    1 
 src/libpcp/src/p_creds.c          |    2 
 src/libpcp/src/p_desc.c           |    2 
 src/libpcp/src/p_error.c          |    2 
 src/libpcp/src/p_fetch.c          |    2 
 src/libpcp/src/p_instance.c       |    2 
 src/libpcp/src/p_lcontrol.c       |    2 
 src/libpcp/src/p_lrequest.c       |    1 
 src/libpcp/src/p_lstatus.c        |    2 
 src/libpcp/src/p_pmns.c           |    2 
 src/libpcp/src/p_profile.c        |    2 
 src/libpcp/src/p_result.c         |    2 
 src/libpcp/src/p_text.c           |    2 
 src/libpcp/src/pmns.c             |    4 
 src/libpcp/src/store.c            |    2 
 src/libpcp/src/tz.c               |    2 
 src/libpcp/src/util.c             |    1 
 src/libpcp_gui/src/GNUmakefile    |   16 +
 src/libpcp_gui/src/exports        |   19 +
 src/libpcp_import/src/GNUmakefile |   26 +-
 src/libpcp_import/src/exports     |   28 ++
 src/libpcp_import/src/private.h   |   39 +++
 src/libpcp_mmv/src/GNUmakefile    |   15 +
 src/libpcp_mmv/src/exports        |   26 ++
 src/libpcp_pmda/src/GNUmakefile   |   22 +-
 src/libpcp_pmda/src/exports       |   93 ++++++++
 src/libpcp_trace/src/GNUmakefile  |   17 +
 src/libpcp_trace/src/exports      |   42 ++++
 src/libpcp_trace/src/ftrace.c     |    4 
 src/libpcp_trace/src/hash.c       |    2 
 src/libpcp_trace/src/hash.h       |   54 +++++
 src/libpcp_trace/src/p_data.c     |   23 ++
 src/libpcp_trace/src/pdu.c        |    8 
 src/libpcp_trace/src/trace.c      |    6 
 src/pmcd/src/pmcd.c               |   10 
 src/pmdas/infiniband/ib.c         |   23 ++
 src/pmdas/pmcd/src/GNUmakefile    |    1 
 src/pmdas/pmcd/src/pmcd.c         |    2 
 src/pmdas/trace/src/GNUmakefile   |    9 
 src/pmdas/trace/src/data.h        |   20 -
 src/pmdas/trace/src/trace.c       |   14 -
 src/pmie/src/GNUmakefile          |   18 -
 src/pmie/src/dstruct.h            |    6 
 src/pmie/src/grammar.y            |    2 
 src/pmie/src/stats.h              |   38 +++
 src/pmie/src/syslog.c             |  202 -------------------
 src/pmie/src/syslog.h             |    7 
 src/pmie/src/systemlog.c          |  198 ++++++++++++++++++
 src/pmie/src/systemlog.h          |    1 
 src/pmieconf/GNUmakefile          |    1 
 src/pmieconf/rules.c              |    8 
 src/pmiestatus/GNUmakefile        |    4 
 src/pmiestatus/pmiestatus.c       |    2 
 src/pmlogextract/logger.h         |   16 +
 src/pmlogextract/logio.c          |   10 
 src/pmlogextract/metriclist.c     |    6 
 src/pmlogextract/pmlogextract.c   |   42 +---
 src/pmlogger/src/fetch.c          |    9 
 src/pmlogrewrite/indom.c          |    2 
 src/pmlogrewrite/logger.h         |   12 -
 src/pmlogrewrite/logio.c          |   10 
 src/pmlogrewrite/metric.c         |    6 
 src/pmlogrewrite/pmlogrewrite.c   |   16 -
 src/pmlogrewrite/util.c           |    4 
 97 files changed, 1804 insertions(+), 953 deletions(-)

commit dd40ff705c5e6426ef16cd38a0077c6c80ef46c9
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Thu Dec 5 17:43:02 2013 +1100

    Tighten check for hidden attribute to gcc-4 or later

commit 0229e8c62ff8a107945f9a7bba3a69de08f0dc75
Author: Dave Brolley <brolley@xxxxxxxxxx>
Date:   Thu Dec 5 17:21:05 2013 +1100

    Resolve a conflict between Avahi and pmcd with multiple ports
    
    An intermittent sigsegv was picked up by qa/283 during recent
    testing.  The cause of the problem is incorrect use of the
    avahi-client API by libpcp when advertising a service on more
    than one port.
    
    Since Avahi requires the services to be committed together in
    one service entry group, the Avahi implementation maintains a
    table of active services. When a new service is added the table
    is updated and the avahi-client is stopped while the new set of
    services is recreated. The client is then restarted. A similar
    process occurs when a service is removed.
    
    Some re-factoring of code and data was also done which reflects
    the new model for which there is only one avahi-client.

commit aa370ea5abb28d2d133332ac4936622648e7c2ef
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Thu Dec 5 16:12:32 2013 +1100

    Shared library symbol versioning and hidden attributes for libpcp
    
    Add a shared library symbol version file for libpcp, the last
    of the PCP libraries to get this treatment and most difficult
    of course.  As was done for the other libraries, this adds in
    use of gcc features that allow any non-static library-internal
    code and data to be marked as such as well.  Thus we now have
    clear API and ABI definitons via the various headers and also
    the src/libpcp/src/exports file.
    
    There were three main areas that were more challenging to deal
    with in libpcp, relative to the other libraries - they were the
    endian-related code, derived metrics, and threading support.
    
    For the first two, we were exporting symbols that weren't part
    of the intended ABI (alot of ntoh/hton-named extensions and a
    series of __dm* functions).  Code has been rearranged so we no
    longer export these deeply-internal interfaces and so that we
    do not have to keep them forever in the ABI definition.
    
    For the latter (but also in the endian case) we were defining
    some symbols conditionally, depending on threading support and
    also thread-debugging support - problematic when attempting to
    define a fixed set of interfaces.  This has been resolved, and
    at the same time the code that was inline in the impl.h within
    the PM_LOCK/PM_UNLOCK macros has been moved into the library,
    improving its readability no end.  Unconditional debug messages
    from those two macros have also been shifted to being guarded
    by pmDebug settings (qa/src/exerlock.c is updated as a result).
    
    As part of testing this work, the non-threaded libpcp build was
    made to work once more - had to tweak check-statics to do so,
    and resolve some warnings here and there in libpcp.
    
    At the end of the day, new symbols added to libpcp (after the
    next release; namely pcp-3.8.9) which we wish to make visible
    to tools, need to be added to the exports file along with an
    appropriate update to the version number there.  Unless such a
    change is made, the symbol will not be exported.  Similarly,
    any new internal symbol we add, that cannot be marked static,
    should be marked as hidden (see _PCP_HIDDEN in internal.h).
    This apparently allows the compiler to deal with it optimally.
    This annotation only needs to be made within the header file.

commit 0ced5d88adb10178d77ffa77686392e168169598
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Thu Dec 5 12:49:23 2013 +1100

    Fix recently introduced compiler warning for pmie grammar.y

commit d592e4e0331c716f41bf26fbc6caea9754d147f9
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Thu Dec 5 12:17:54 2013 +1100

    Remove endian macro/routine abuse in pmcd client handshake
    
    Simplify the pmcd code which endian swaps the pduinfo word,
    which is exchanged as part of an initial client connection.
    There's no reason to expose this symbol in libpcp for just
    this questionable use - its just a htonl-obfuscator.
    
    This is the last external dependence on the endian code in
    libpcp, so in a future commit we'll be able to internalise
    this code and remove its unintended API/ABI footprint.

commit 305aed49ea97e153b1a6741fa4b1135e9b23487d
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Thu Dec 5 12:10:58 2013 +1100

    Symbol visibility cleanup in pmlogextract and pmlogrewrite
    
    Firstly, removals several instances of .c code using "extern" in
    these tools, instead of sharing header files with common defs.
    Then, removed several cases of abuse of endian code from inside
    libpcp which can be trivially done alongside the other ntohl use
    in these tools already.  Finally, use more consistent naming for
    local routines that could potentially clash with libpcp names in
    the future (__pm* - some were single underscore, others double -
    now more consistently making use of the former in these tools).

commit ea49a24a77bb4caeb36ce98a8a5bdf2e3d3bdc3a
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Thu Dec 5 10:06:50 2013 +1100

    Remove dependence on an unmaintainable internal libpcp symbol
    
    In two places we had leaked out a dependence on a symbol that
    definitely should have been internal to libpcp - __htonll.  We
    simply cannot maintain symbols named like that in a shlib that
    could be used by arbitrary applications, its a timebomb and it
    will be awful for someone to have to debug/workaround a symbol
    collision on that bad boy.
    
    This removes those dependencies so we can properly internalise
    this symbol like nature intended, in a future commit.

commit 877c809af4c59ab1f9c489a45d023052fd5758a2
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Wed Dec 4 18:53:02 2013 +1100

    Resolve a few more pmiestats related build issues missed earlier
    
    This commit also renames the pmie source file named syslog.h as it
    interferes with a system header of the same name on some platforms
    and this ended up being problematic when using the internal header
    for stats between different pcp tools.

commit 4f0a12b09d8d261e84314ff0e526dcd17d77d803
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Wed Dec 4 14:50:09 2013 +1100

    Put PMI function attributes at end of declaration, consistency

commit df70da801d9460adab30cf992a28cbeb5d899ac4
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Wed Dec 4 11:46:32 2013 +1100

    Stop installing pmiestats.h which exposes pmie internals
    
    There is no need to pollute the set of headers we install
    with pmiestats.h - make it internal in such a way that it
    can still be shared between pmie and pmiestatus.

commit 6861fa03b448c251a315839c55e07498901bdeee
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Wed Dec 4 11:12:39 2013 +1100

    Remove unnecessary hard-coded include path in QA src build

commit 031c9e4add95036fc1255160d917aa0361bf9cb1
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Wed Dec 4 11:12:04 2013 +1100

    Shared library symbol versioning for libpcp_trace
    
    Add a library symbol version file for libpcp_trace.  Stop
    installing the hash API header, this is deeply internal,
    and nothing ever needs it (other than pmdatrace and lib).
    Had to keep the dev header though as the QA tests use it.
    
    Made a couple of unintentionally exposed symbols hidden.
    
    Fix comment in trace.h about where demo programs can be
    found, and add a note about the programmers guide too.
    
    Remove an old Mac OS X hack in the trace PMDA makefile as
    we nowadays (for quite some time) do not get __htonll in
    both libpcp and libpcp_trace.
    
    Also fixed the Fortran call interface for pmtraceobs_ as
    it was using the AT&T Unix interface and not the version
    supported by Linux/gcc.

commit 3b19b345f793f3998d7399fbbea36bfe330c9da3
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Tue Dec 3 17:45:35 2013 +1100

    Shared library symbol versioning for libpcp_pmda

commit 6b3f07cabdc5115fc585fabe9d728e85597fff19
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Tue Dec 3 17:35:24 2013 +1100

    Shared library symbol versioning for libpcp_gui

commit 35ce669f6af799c1f64d3f440dbce4d382147e9b
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Tue Dec 3 16:16:53 2013 +1100

    Shared library symbol versioning for libpcp_import
    
    Addition of exports file, makefile tweaks, and also found
    a handful of internal routines being made unintentionally
    available (underscore prefixed).  These are never useful
    to anyone outside the library so mark them hidden if gcc
    is being used.
    
    Converted the makefile to using DOMAIN_MAKERULE as well,
    looks like it was overlooked in the last sweep.

commit f7d49f317e33c344f7510d504af3cf6759d50264
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Tue Dec 3 15:56:44 2013 +1100

    Shared library symbol versioning for libpcp_mmv

<Prev in Thread] Current Thread [Next in Thread>