Development

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Speedup gij/libjava loading on darwin

    7 answers - 832 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Darwin, libjava testing takes for ever. The issue is that loading
    gij (and
    the native programs) is slow and most of the time is spent dyld (the
    dynamic
    loader, like ld.so). If we link with -single_module, the issue goes
    away
    because the dynamic loader have less symbols to resolve at load time.
    I stole the code in libobjc and libgfortran which I wrote to fix
    implement this.
    K? Bootstrapped and tested on powerpc-darwin with no regressions.
    and testing libjava takes now 2.5 hours instead of 4 hours or so.
    Thanks,
    Andrew Pinski
    ChangeLog:
    * Makefile.am (extra_ldflags_libjava): New variable to
    substitute in.
    (LIBLINK): Add extra_ldflags_libjava to it.
    * configure.ac (extra_ldflags_libgfortran): Set for *-darwin* to
    "-Wl,-single_module".
  • No.1 | | 371 bytes | |

    Aug 18, 2005, at 11:26 PM, Andrew Pinski wrote:

    and testing libjava takes now 2.5 hours instead of 4 hours or so.

    it is more than 4 hours, it was more like 6 hours, I was counting
    from the wrong time when libjava testing started.

    Also this should speed up the regression tester so we get a smaller
    set of tests tested.
    -- Pinski
  • No.2 | | 596 bytes | |

    Andrew Pinski writes:

    Darwin, libjava testing takes for ever. The issue is that
    loading gij (and the native programs) is slow and most of the time
    is spent dyld (the dynamic loader, like ld.so). If we link with
    -single_module, the issue goes away because the dynamic loader have
    less symbols to resolve at load time.

    I stole the code in libobjc and libgfortran which I wrote to fix
    implement this.

    K? Bootstrapped and tested on powerpc-darwin with no regressions.

    Looks good. Is -single_module Darwinese for -Bsymbolic?

    Andrew.
  • No.3 | | 1062 bytes | |

    Aug 19, 2005, at 5:21 AM, Andrew Haley wrote:
    >K? Bootstrapped and tested on powerpc-darwin with no regressions.
    >

    Looks good. Is -single_module Darwinese for -Bsymbolic?

    In a way yes. The way functions call other functions on Darwin is via
    a stub which was created by the compiler, -signal_module tells the
    linker
    to get rid of all those stubs for the functions inside that module.
    So for an example:
    if you have the following TUs:
    int g(void);
    int f(void) { return f();}

    int g(void) { return 0; }

    Normally in the first TU, the compiler creates a stub to call g.
    And then in a shared library linked with -single_module, the stub is
    removed and a direct call is created so you end up with no way to
    over ride the function g at all out side the shared library.
    So you end up with less relocations in the shared library for the
    loader to deal with.

    For executables, it is about the same as shared libraries with
    -single_module.

    -- Pinski
  • No.4 | | 503 bytes | |

    "Andrew" == Andrew Pinski <pinskia (AT) physics (DOT) uc.eduwrites:

    Andrew* Makefile.am (extra_ldflags_libjava): New variable to
    Andrewsubstitute in.
    Andrew(LIBLINK): Add extra_ldflags_libjava to it.

    You used automake 1.9.4 while the tree as a whole (excepting
    libgfortran) is currently using 1.9.3. I think it would be fine for
    all directories to move forward, but IM it is better to do this in
    sync (and update install.texi) instead of at random.

    Tom
  • No.5 | | 625 bytes | |

    Mike Stump writes:
    Thursday, August 18, 2005, at 08:26 PM, Andrew Pinski wrote:
    Darwin, libjava testing takes for ever. The issue is that loading
    gij (and
    the native programs) is slow and most of the time is spent dyld (the
    dynamic
    loader, like ld.so). If we link with -single_module, the issue goes
    away
    because the dynamic loader have less symbols to resolve at load time.

    Seems reasonable to me, as long as everyone likes the semantics (cannot
    override/replace funcs from that lib).

    That's the right thing for the java core runtime library.

    Andrew.
  • No.6 | | 441 bytes | |

    "Andrew" == Andrew Haley <aph (AT) redhat (DOT) comwrites:

    >Seems reasonable to me, as long as everyone likes the semantics (cannot
    >override/replace funcs from that lib).


    AndrewThat's the right thing for the java core runtime library.

    reason we haven't done this for Linux builds is that Anthony has a
    jvmpi-using LD_PRELAD hack he likes to use

    Tom
  • No.7 | | 540 bytes | |

    Tom Tromey writes:
    "Andrew" == Andrew Haley <aph (AT) redhat (DOT) comwrites:

    >Seems reasonable to me, as long as everyone likes the semantics (cannot
    >override/replace funcs from that lib).


    AndrewThat's the right thing for the java core runtime library.

    reason we haven't done this for Linux builds is that Anthony has a
    jvmpi-using LD_PRELAD hack he likes to use

    This is pretty lame, really. We really should fix it for 4.1.

    Andrew.

Re: Speedup gij/libjava loading on darwin


max 4000 letters.
Your nickname that display:
In order to stop the spam: 4 + 3 =
QUESTION ON "Development"

EMSDN.COM