tools/tests/isa-module.pl
author Mike Hommey <mh+mozilla@glandium.org>
Thu, 07 Jun 2012 10:41:59 +0200
changeset 98761 627b93e8a41cbe3ed3b87ad25ea9f7cfbeea1c20
parent 1 9b2a99adc05e53cd4010de512f50118594756650
permissions -rwxr-xr-x
Bug 580408 - Glue for jemalloc 3.0.0. r=khuey

#!/usr/bin/perl -w

use Cwd;

$curdir = cwd();

@path_fields = split(/\//,$curdir);

$path = join ("/",@path_fields);

print "Searching in " . $path . "\n";

open (REPORT, "find $path -name \"*.so\" -print | xargs nm -Bno | egrep NSGetModule 2>&1 |" ) || die "open: $! \n";

print "Modules:\n";
while (<REPORT>) {
    $module = $_;
    $module =~ s/:.*//;
    print $module;
}
close(REPORT);

open (REPORT, "find $path -name \"*.so\" -print | xargs nm -Bno | egrep NSGetFactory 2>&1 |" ) || die "open: $! \n";

print "\nComponents:\n";
while (<REPORT>) {
    $module = $_;
    $module =~ s/:.*//;
    print $module;
}
close(REPORT);