[petsc-dev] CheckPointer

Jed Brown jedbrown at mcs.anl.gov
Fri Dec 20 14:12:36 CST 2013


Jim Fonseca <jefonseca at gmail.com> writes:

> Hi,
> Does anyone have an update on PetscCheckPointer?

Here are the relevant commits.

commit 08007ceffc8bbbb292d271d8fb68d383dc802536
Merge: ea27c00 28559dc
Author: Jed Brown <jedbrown at mcs.anl.gov>
Date:   Tue Oct 22 23:54:11 2013 -0500

    Merge branch 'jed/check-pointer-runtime' into next
    
    * jed/check-pointer-runtime:
      Sys: add PetscCheckPointerSetIntensity -check_pointer_intensity
      Sys: add PetscFunctionBeginHot to switch to cheaper pointer checks
      PetscStack: use same definitions for PetscStack functions
      PetscStack: declare types regardless of debug vs. optimized

commit 28559dc8e3b01649f1bb28782e463c7c8cc5bdac
Author: Jed Brown <jedbrown at mcs.anl.gov>
Date:   Tue Oct 22 07:59:24 2013 -0500

    Sys: add PetscCheckPointerSetIntensity -check_pointer_intensity
    
    Offers run-time control over pointer checking.  Intensity levels are
    
      0. Never use a signal handler to check pointers
      1. Use a signal handler to check pointers when not in "hot" functions
      2. Always use signal handler to check pointers

commit a2f94806544a9e762bb1e13643a479e55c7e525e
Author: Jed Brown <jedbrown at mcs.anl.gov>
Date:   Thu Sep 12 03:17:09 2013 -0700

    Sys: add PetscFunctionBeginHot to switch to cheaper pointer checks
    
    Some logging and debugging operations are expensive.  In particular,
    applications can see order of magnitude slowdowns when PetscCheckPointer
    configures a special signal handler (debug builds only).  Additionally,
    high-frequency events like MAT_SetValues are disabled by default because
    it can be expensive to profile.
    
    My marking "hot" regions, we can turn off the expensive operations by
    default, but still have the ability to enable them at run-time.  This
    commit adds PetscFunctionBeginHot, with logic in PetscCheckPointer to
    skip the check while inside a "hot" function.
    
    Reported-by: Dave May <dave.mayhem23 at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20131220/6a30b000/attachment.sig>


More information about the petsc-dev mailing list