pcp
[Top] [All Lists]

pcp updates: pmdalinux vs valgrind vs s390x, packaging split

To: PCP <pcp@xxxxxxxxxxx>
Subject: pcp updates: pmdalinux vs valgrind vs s390x, packaging split
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Thu, 13 Feb 2014 02:47:32 -0500 (EST)
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <964461579.6117843.1392277555477.JavaMail.zimbra@xxxxxxxxxx>
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>
Thread-index: STU4TTfSUMUHzTpkDSR2FpE4VZlxBQ==
Thread-topic: pcp updates: pmdalinux vs valgrind vs s390x, packaging split
Changes committed to git://oss.sgi.com/pcp/pcp.git dev

 build/rpm/fedora.spec          |  115 +++++++++++++++++++++++++++++-------
 build/rpm/pcp.spec.in          |  130 +++++++++++++++++++++++++++++++++--------
 debian/GNUmakefile             |   31 ++++++++-
 debian/control                 |   26 ++++++++
 debian/libpcp3-dev.install     |    1 
 debian/pcp-manager.dirs        |    2 
 debian/pcp-manager.install     |   11 +++
 debian/pcp-manager.postinst    |   14 ++++
 debian/pcp-manager.postrm      |    6 +
 debian/pcp-manager.prerm       |    8 ++
 debian/pcp-webapi.dirs         |    2 
 debian/pcp-webapi.install      |    5 +
 debian/pcp-webapi.postinst     |   14 ++++
 debian/pcp-webapi.postrm       |    6 +
 debian/pcp-webapi.prerm        |    8 ++
 debian/pcp.postinst.tail       |   11 ---
 debian/pcp.postrm.tail         |    3 
 debian/pcp.preinst.tail        |    2 
 debian/pcp.prerm               |    2 
 debian/rules                   |   13 ++++
 src/pmdas/linux/proc_cpuinfo.c |    5 +
 src/pmdas/linux/proc_stat.c    |   64 +++++++++++---------
 22 files changed, 385 insertions(+), 94 deletions(-)

commit 1d7cbdeb246410ffba4d48570fce21d0b2168484
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Thu Feb 13 14:46:27 2014 +1100

    Packaging changes to support pcp-manager and pcp-webapi split
    
    Migrate pmmgr(1) and pmwebd(1) daemons into their own packages.
    This allows for independent development on pmmgr and potentially
    aggressive enablement of new features there, as well as removing
    the (non-default install) libmicrohttpd dependency from the core
    PCP packages.
    
    Now's a good time - we're splitting packages for multilib in the
    next release anyway, so do these packaging changes all at once.

commit f5eaeea7900390ae007f5ed3375cadc6ca86497e
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Thu Feb 13 14:20:52 2014 +1100

    Fix s390x platform issues in /proc/cpuinfo parser
    
    The format of /proc/cpuinfo on s390x is nothing like any other
    platform.  We cannot attempt to push it through the same code
    path, it simply has nothing in common.  If we try (as we used to)
    things fall apart when we use the (negative) cpu number local
    variable to index into the cpuinfo array.
    
    Resolved by adding in some defensive code to short-circuit the
    decoding logic when an unexpected file format is seen.

commit 5ebdf2fe3f1aca661ed1a13a6aa45e3c27d228c2
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Thu Feb 13 14:12:49 2014 +1100

    Fix valgrind errors in pmdalinux /proc/stat refresh
    
    This one has bugged me for a long time, and I finally needed to spend
    some time hunting an obscure memory corruption in pmdalinux - so got
    to revisit this properly.
    
    There were a few small problems in refresh_proc_stat causing valgrind
    to report "invalid read of zero size".  Most problematic was the code
    reading the stat buffer initially, which slightly confuses the offset
    and size combo in passing a buffer pointer to read(2).  The realloc
    call here also happened to allocate 8x the (small) memory it wanted,
    accidently multiplying the size by sizeof(char).
    
    The nbufindex calculation also ended up with one more line than was
    in the buffer, which was OK because it always created an empty line
    at the end of it (which doesn't actually exist in /proc/stat).
    
    Finally, added some small improvements to the handling of ENOMEM for
    these global stat buffers, and removed a double-memset on the initial
    call (which callocs a zeroed buffer).

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