Statistical profiling fixes:
- PM: get rid of umap warning - sprofalyze.pl: update with recently added servers and drivers - sprofalyze.pl: properly truncate process names for sample matching
This commit is contained in:
parent
cca24d06d8
commit
c7f1b547cb
2 changed files with 30 additions and 10 deletions
|
@ -20,32 +20,46 @@ $nm = "/usr/bin/nm -dn";
|
||||||
);
|
);
|
||||||
|
|
||||||
# Location of system executables within src. Add new servers/drivers here.
|
# Location of system executables within src. Add new servers/drivers here.
|
||||||
|
# This should be replaced with something less maintenance-prone some day.
|
||||||
@exes = qw(
|
@exes = qw(
|
||||||
kernel/kernel
|
kernel/kernel
|
||||||
|
|
||||||
servers/ds/ds
|
servers/ds/ds
|
||||||
servers/vfs/vfs
|
servers/hgfs/hgfs
|
||||||
servers/mfs/mfs
|
|
||||||
servers/inet/inet
|
servers/inet/inet
|
||||||
|
servers/ipc/ipc
|
||||||
servers/is/is
|
servers/is/is
|
||||||
|
servers/iso9660fs/isofs
|
||||||
|
servers/mfs/mfs
|
||||||
|
servers/pfs/pfs
|
||||||
servers/pm/pm
|
servers/pm/pm
|
||||||
servers/rs/rs
|
servers/rs/rs
|
||||||
|
servers/vfs/vfs
|
||||||
servers/vm/vm
|
servers/vm/vm
|
||||||
servers/rs/service
|
servers/rs/service
|
||||||
|
|
||||||
|
drivers/amddev/amddev
|
||||||
drivers/at_wini/at_wini
|
drivers/at_wini/at_wini
|
||||||
|
drivers/atl2/atl2
|
||||||
|
drivers/audio/es1370/es1370
|
||||||
|
drivers/audio/es1371/es1371
|
||||||
drivers/bios_wini/bios_wini
|
drivers/bios_wini/bios_wini
|
||||||
|
drivers/dec21140A/dec21140A
|
||||||
drivers/dp8390/dp8390
|
drivers/dp8390/dp8390
|
||||||
drivers/dpeth/dpeth
|
drivers/dpeth/dpeth
|
||||||
|
drivers/e1000/e1000
|
||||||
|
drivers/filter/filter
|
||||||
drivers/floppy/floppy
|
drivers/floppy/floppy
|
||||||
drivers/fxp/fxp
|
drivers/fxp/fxp
|
||||||
drivers/lance/lance
|
drivers/lance/lance
|
||||||
drivers/log/log
|
drivers/log/log
|
||||||
drivers/memory/memory
|
drivers/memory/memory
|
||||||
|
drivers/orinoco/orinoco
|
||||||
drivers/pci/pci
|
drivers/pci/pci
|
||||||
drivers/printer/printer
|
drivers/printer/printer
|
||||||
drivers/random/random
|
drivers/random/random
|
||||||
drivers/rtl8139/rtl8139
|
drivers/rtl8139/rtl8139
|
||||||
|
drivers/rtl8169/rtl8169
|
||||||
drivers/sb16/sb16_dsp
|
drivers/sb16/sb16_dsp
|
||||||
drivers/sb16/sb16_mixer
|
drivers/sb16/sb16_mixer
|
||||||
drivers/ti1225/ti1225
|
drivers/ti1225/ti1225
|
||||||
|
@ -94,6 +108,14 @@ foreach $file (@files) {
|
||||||
exit 0;
|
exit 0;
|
||||||
|
|
||||||
|
|
||||||
|
sub short_name
|
||||||
|
{
|
||||||
|
my $shortname = shift;
|
||||||
|
$shortname =~ s/^.*\///;
|
||||||
|
return substr($shortname, 0, 7);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
sub read_symbols
|
sub read_symbols
|
||||||
{
|
{
|
||||||
print "Building indexes from symbol tables:";
|
print "Building indexes from symbol tables:";
|
||||||
|
@ -104,6 +126,7 @@ sub read_symbols
|
||||||
$shortname =~ s/^.*\///;
|
$shortname =~ s/^.*\///;
|
||||||
print " " if $i <= $#exes;
|
print " " if $i <= $#exes;
|
||||||
print $shortname;
|
print $shortname;
|
||||||
|
$shortname = short_name($exe);
|
||||||
|
|
||||||
$fullname = $src_root . $exe;
|
$fullname = $src_root . $exe;
|
||||||
|
|
||||||
|
@ -198,9 +221,6 @@ sub process_datafile
|
||||||
read(FILE, $buf, $SAMPLE_SIZE) == $SAMPLE_SIZE or die ("Short read.");
|
read(FILE, $buf, $SAMPLE_SIZE) == $SAMPLE_SIZE or die ("Short read.");
|
||||||
($exe, $pc) = unpack("Z8i", $buf);
|
($exe, $pc) = unpack("Z8i", $buf);
|
||||||
|
|
||||||
# p_name "mem" refers to executable "memory".
|
|
||||||
$exe =~ s/^mem/memory/;
|
|
||||||
|
|
||||||
# We can access the hash by pc because they are all in there.
|
# We can access the hash by pc because they are all in there.
|
||||||
if (!defined(${$exe."_hash"}{$pc})) {
|
if (!defined(${$exe."_hash"}{$pc})) {
|
||||||
print "ERROR: Undefined in symbol table indexes: ";
|
print "ERROR: Undefined in symbol table indexes: ";
|
||||||
|
@ -214,7 +234,7 @@ sub process_datafile
|
||||||
# We only need to continue with executables that had any hits.
|
# We only need to continue with executables that had any hits.
|
||||||
my @actives = ();
|
my @actives = ();
|
||||||
foreach my $exe (@exes) {
|
foreach my $exe (@exes) {
|
||||||
$exe =~ s/^.*\///;
|
$exe = short_name($exe);
|
||||||
next if (!exists($res{$exe}));
|
next if (!exists($res{$exe}));
|
||||||
push(@actives, $exe);
|
push(@actives, $exe);
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,13 +96,13 @@ int info_size;
|
||||||
phys_bytes p;
|
phys_bytes p;
|
||||||
|
|
||||||
/* Check if supplied pointers point into user process. */
|
/* Check if supplied pointers point into user process. */
|
||||||
if ((r = sys_umap(who_e, D, (vir_bytes) m_in.PROF_CTL_PTR,
|
if ((r = sys_umap(who_e, VM_D, (vir_bytes) m_in.PROF_CTL_PTR,
|
||||||
1, &p)) != OK) {
|
1, &p)) != OK) {
|
||||||
printf("PM: PROFILE: umap failed for process %d\n", who_e);
|
printf("PM: PROFILE: umap failed for process %d\n", who_e);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((r =sys_umap(who_e, D, (vir_bytes) m_in.PROF_MEM_PTR,
|
if ((r =sys_umap(who_e, VM_D, (vir_bytes) m_in.PROF_MEM_PTR,
|
||||||
1, &p)) != OK) {
|
1, &p)) != OK) {
|
||||||
printf("PM: PROFILE: umap failed for process %d\n", who_e);
|
printf("PM: PROFILE: umap failed for process %d\n", who_e);
|
||||||
return r;
|
return r;
|
||||||
|
|
Loading…
Reference in a new issue