Permalink
Switch branches/tags
Nothing to show
Commits on Aug 21, 2012
  1. Add two finalizer tests

    travitch committed Aug 21, 2012
  2. Improve HTML drilldowns

    travitch committed Aug 21, 2012
    This change hyperlinks calls to functions through aliases to their
    real targets.  Before these were just ignored and it made navigation a
    pain in libraries that use function aliases extensively.
    
    It required changing some Javascript, too, so that textual names (the
    aliases) can be mapped back to their real implementations.
  3. Add a missing type signature

    travitch committed Aug 21, 2012
Commits on Aug 20, 2012
  1. Improve alias handling in the HTML reports

    travitch committed Aug 20, 2012
    Now only list functions that are actually visible - before the report
    generator was only looking at function linkage and not including
    visibility.  This mean that functions marked with visibility(hidden)
    showed up in the public interface.
    
    For most libraries it doesn't matter much, but for others (like
    libxml2), there are public aliases to expose these functions and the
    private variants are decorated with strange mangled names.  This change
    makes everything look like a proper public API.
  2. Remove the dependency on data-default

    travitch committed Aug 20, 2012
    It isn't that useful in this case and there are some other packages I
    need more with obnoxious dependencies on lower versions of
    data-default.  This might be fixed once lzma-conduit is updated to a
    modern version of conduit.
  3. Do not export Control.Monad.RWS from AnalysisMonad

    travitch committed Aug 20, 2012
    This is a huge module and we don't want to pollute every other module
    with it.  Now just export the necessary accessors (renamed to not
    clash with RWS).
  4. Switch to lens instead of data-lens

    travitch committed Aug 20, 2012
    This package has some more convenient operators and the polymorphic
    field updates are really slick (even if I don't use them yet).
Commits on Aug 13, 2012
  1. Consider external functions when identifying contract escapes

    travitch committed Aug 13, 2012
    Due to some unfortunate choices before, they were not considered and
    always induced indirect escapes.  This commit corrects this and
    produces much better results in some cases (particularly eliminating
    spurious escapes on finalizers, which often impact allocators
    indirectly)
Commits on Aug 11, 2012
  1. Ignore indirect recursive calls in the finalizer analysis

    travitch committed Aug 11, 2012
    If a finalizer has itself as an indirect target in its definition,
    ignore that possible callee and only consider the rest.  Otherwise,
    it will never be recognized.  Often, such a target is the result of
    an imprecise points-to analysis anyway.
  2. Add fewer facts in the indirect call resolver

    travitch committed Aug 11, 2012
    Some sub-facts were being added that produced false positives.
    Consider the example
    
    > a->b->c->d = foo;
    
    The analysis was adding the facts
    
    > a->b->c->d = foo
    > b->c->d = foo
    > c->d = foo
    > d = foo
    
    where we don't actually want the last fact.
Commits on Aug 10, 2012
  1. Handle an extra case in the argument escapes

    travitch committed Aug 10, 2012
    This cleans up some nested matches and handles the extra case to
    avoid runtime exceptions.  The case arose when a value escaped
    into two different allocas
Commits on Aug 9, 2012
  1. Add a new type of escape to the escape analysis: escape into argument.

    travitch committed Aug 9, 2012
    This change recognizes cases where one argument escapes into another.
    For example:
    
    > #include <stdio.h>
    >
    > struct S {
    >   int * p;
    >   int * q;
    > };
    >
    > void f(struct S * s, int * i) {
    >   s->q = i;
    > }
    >
    > void g(int * i) {
    >   struct S s;
    >   f(&s, i);
    >
    >   printf("%d\n", *s.q);
    > }
    
    In function @f@, @i_f@ escapes into @s@.  This information lets us see
    that in @g@, which calls @f@, @i_g@ escapes into the local variable
    @s@.  Since @s@ does not escape, we can then conclude that @i_g@ does
    not escape either.  There are some interesting cases in several
    libraries (including fontconfig and freetype) of this pattern.
    Generally, it is used to have some helper function initialize a local
    structure that never escapes.
    
    I need to think a bit more about some composability issues, and
    ensuring that it is properly conservative in some edge cases.
    
    The tests currently look correct (the expected output is not yet
    updated to reflect the new results so they technically fail).
Commits on Aug 8, 2012
Commits on Aug 7, 2012
  1. Switch to the non-monadic xdfsWith

    travitch committed Aug 7, 2012
    The monadic version wouldn't be safe for what is intended anyway,
    so prefer a plain function
  2. Handle a missing case of proxying an argument through a function that…

    travitch committed Aug 7, 2012
    … lets a field escape
    
    See escape-through-2-call-field.c
  3. Another rewrite of the escape analysis

    travitch committed Aug 7, 2012
    This version uses the same algorithm but is backed by an explicit graph
    instead of datalog.  The datalog implementation was precise but too slow
    (it did not complete on simple benchmarks like pcre).  This commit makes
    it as fast as the original, but using the working algorithm.  It is still
    considerably simpler than the original, too.
Commits on Aug 2, 2012
  1. Handle proxying field escapes

    travitch committed Aug 2, 2012
Commits on Aug 1, 2012
  1. Clean up some warnings, feature parity with the old analysis

    travitch committed Aug 1, 2012
    Silences warnings in the escape analysis, too
  2. The escape analysis is just about back to feature parity

    travitch committed Aug 1, 2012
    Only the contract escape identification is not restored.  The rest of
    the tests pass (except where the changes exposed bugs in the tests).
    
    This change includes re-implementations of the 'instructionEscapes*'
    family of functions.  These are now much simpler, though possibly a
    bit slower.
Commits on Jul 31, 2012
  1. Interim checkin of the escape analysis rewrite

    travitch committed Jul 31, 2012
    Currently 18/24 tests are passing
Commits on Jul 30, 2012
  1. Simple style fix

    travitch committed Jul 30, 2012
    Combines two possibly-failing computations under one
Commits on Jul 25, 2012