pcp updates: libpcp multithreading - documentation and tools for call graphs & lock analysis

"Ken McDonell" <[email protected]>
Newsgroups gmane.comp.sysutils.pcp
Message-ID <[email protected]>
This is very much WIP.

The build never descends into this new directory, so no risk to the upcoming release ... I just want to make this visible (particularly libpcp-locking.odt) to solicit feedback at the early stage of this work before any code changes are proposed.

Changes committed to git://git.pcp.io/kenj/pcp master

Ken McDonell (7):
      src/libpcp/doc/mk.cgraph: tool to build lock-specific call graphs
      src/libpcp/doc: data files for mk.cgraph
      src/libpcp/doc/mk.cgraph: version 2
      src/libpcp/doc: updates for mk.cgraph
      src/libpcp/doc: the locking and concurrency control document
      src/libpcp/doc: mk.cgraph changes
      src/libpcp/doc: add prune.cgraph

 src/libpcp/doc/.gitignore         |    2
 src/libpcp/doc/GNUmakefile        |   34 ++
 src/libpcp/doc/README             |   35 ++
 src/libpcp/doc/glibc.safe         |  146 +++++++++
 src/libpcp/doc/glibc.unsafe       |   17 +
 src/libpcp/doc/libpcp-locking.odt |binary
 src/libpcp/doc/mk.cgraph          |  577 ++++++++++++++++++++++++++++++--------
 src/libpcp/doc/other.safe         |   97 ++++++
 src/libpcp/doc/other.unsafe       |   31 ++
 src/libpcp/doc/posix.unsafe       |   91 +++++
 src/libpcp/doc/prune.cgraph       |  121 +++++++
 11 files changed, 1029 insertions(+), 122 deletions(-)

Details ...

commit 505cfb67cf97facdac6a24bb05ed4598841f2ede
Author: Ken McDonell <[email protected]>
Date:   Fri Dec 16 10:55:11 2016 +1100

    src/libpcp/doc: add prune.cgraph

    Attempting to simplify the call graphs for lock analysis, so a
    new script to ...

        Prune a call graph from mk.cgraph

        The algorithm here is a leaf to root approach to removing nodes
        that are themselves unconditionally thread-safe (meaning they acquire
        no locks and call only thread-safe routines), and remove all incoming
        arcs to these nodes.

        And repeat until there are no changes.

commit 1a2f44546992558e5e77f14f7c6834049e873be0
Author: Ken McDonell <[email protected]>
Date:   Fri Dec 16 10:54:09 2016 +1100

    src/libpcp/doc: mk.cgraph changes

    - tweak (fix) cscope -I usage
    - some more *.safe additions

commit 7eaa9d09c019ae1d4feadddf8c3ffd3df7d04605
Author: Ken McDonell <[email protected]>
Date:   Fri Dec 16 06:33:43 2016 +1100

    src/libpcp/doc: the locking and concurrency control document

commit 99aab0e00e16326af63d56dc2799359709bca16a
Author: Ken McDonell <[email protected]>
Date:   Fri Dec 16 06:11:47 2016 +1100

    src/libpcp/doc: updates for mk.cgraph

    - remove external thread-safe routines by default (so drop -o, add -e
      to include these if required)
    - add -f file option to process all functions in a file
    - add -s func[,func] option to stop recursion at named functions
      (intended for subgraphs that are common, e.g. calling __pmNotifyErr)
    - add -w option for warnings (especially functions that are not known
      to cscope, so that their thread safeness can be determined)
    - add other.safe and other.unsafe for external routines outside
      glibc
    - update glibc.safe and glibc.unsafe as -w exposes more of glibc
      that is called from libpcp

commit 8aa1af4467ed5b14084da4104a2fba0d808ae141
Author: Ken McDonell <[email protected]>
Date:   Mon Dec 12 06:42:22 2016 +1100

    src/libpcp/doc/mk.cgraph: version 2

    Change graph model, so
    - locks are node labels associated with the routine where the
      lock is acquired, rather than an edge label for calls to routines
      from the lock acquiring routine
    - as there is no lock-unlock logic, the -e option to ignore PM_UNLOCK
      is no longer needed
    - omit thread-safe external routines (they are adding clutter and no
      value) ... add -e option to include them if needed

commit 10c00cd086857a221f4c87716aea6e7552a0a36f
Author: Ken McDonell <[email protected]>
Date:   Sun Dec 11 06:21:29 2016 +1100

    src/libpcp/doc: data files for mk.cgraph

    These files list the routines external to libpcp that are known
    to be thread-safe or potentially thread-unsafe.

    The posix.unsafe list is stable and from the POSIX documentation.

    The glibc.{safe,unsafe} list is being built as mk.cgraph encounters
    routines that have not been seen before, so this is evolving and only
    includes glibc routines we use in libpcp.

commit a17042e5f4c87bba3898613a89ef3fc7820c513b
Author: Ken McDonell <[email protected]>
Date:   Sun Dec 11 06:18:51 2016 +1100

    src/libpcp/doc/mk.cgraph: tool to build lock-specific call graphs

    First steps in documenting locking and concurrency control in
    libpcp.

    This tool uses cscope to construct a static call graph with lock
    annotation.

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links:

You receive all messages sent to this group.

View/Reply Online (#14910): https://groups.io/g/pcp/message/14910
View All Messages In Topic (1): https://groups.io/g/pcp/topic/3819767
Mute This Topic: https://groups.io/mt/3819767?uid=174580
New Topic: https://groups.io/g/pcp/post

Change Your Subscription: https://groups.io/g/pcp/editsub?uid=174580

Group Home: https://groups.io/g/pcp
Contact Group Owner: [email protected]

Terms of Service: https://groups.io/static/tos

Unsubscribe: https://groups.io/g/pcp/leave/354243/563757577/xyzzy

-=-=-
pcp mailing list
[email protected]
https://groups.io/g/pcp/messages
-=-=-=-=-=-=-=-=-=-=-=-
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.