Complain if we can't find /lib/modules/uname -r/build/Makefile.

Tue Aug 30 16:57:33 2005  Søren Sandmann  <sandmann@redhat.com>

	* configure.ac: Complain if we can't find /lib/modules/`uname
	-r`/build/Makefile.

	* process.c (process_lookup_symbol): Take an address of 0x1 to
	mean "in kernel".

	* module/sysprof-module.c (timer_notify): When reporting in-kernel
	time, give the current pid instead of -1.

	* TODO: updates
This commit is contained in:
Søren Sandmann
2005-08-30 20:58:18 +00:00
committed by Søren Sandmann Pedersen
parent 509d5f07ed
commit ee53bcffd4
5 changed files with 50 additions and 14 deletions

View File

@ -1,3 +1,16 @@
Tue Aug 30 16:57:33 2005 Søren Sandmann <sandmann@redhat.com>
* configure.ac: Complain if we can't find /lib/modules/`uname
-r`/build/Makefile.
* process.c (process_lookup_symbol): Take an address of 0x1 to
mean "in kernel".
* module/sysprof-module.c (timer_notify): When reporting in-kernel
time, give the current pid instead of -1.
* TODO: updates
Mon Aug 15 20:39:11 2005 Soeren Sandmann <sandmann@redhat.com>
* binfile.c, process.c, profile.c: Fix some warnings.

6
TODO
View File

@ -1,5 +1,10 @@
Before 1.0:
* Fix cache so that it correctly reloads libraries when new ones are
installed. (Cache can go stale - probably just dump the cache when
a new profiling session is started). Though printing debug stuff
doesn't seem to produce anything unexpected.
* Build system
- Find out what distributions it actually works on
(ask for sucess/failure-stories in 0.9.x releases)
@ -13,6 +18,7 @@ Before 1.0:
- Announce on Freshmeat
- Announce on Advogato
- Announce on gnome-announce
- Announce on kernel list.
- Announce on devtools list (?)
Before 1.2:

View File

@ -77,12 +77,18 @@ KMINOR=`uname -r | cut -d"." -f 2`
KMICRO=`uname -r | cut -d"." -f 3 | cut -d"-" -f 1`
if [[ $KMICRO -lt 11 ]] ; then
if [[ $KMICRO -gt 8 ]]; then
echo
echo Linux \>= 2.6.11 is required
echo
exit 1
fi
echo *
echo * Linux \>= 2.6.11 is required
echo *
exit 1
fi
if [ ! test -f /lib/modules/`uname -r`/build/Makefile ] ; then
echo \*
echo \* Sysprof requires the kernel source code to be installed.
echo \* On a Fedora Core system the relevant package is kernel-devel
echo \*
exit 1
fi
AC_OUTPUT

View File

@ -462,10 +462,12 @@ timer_notify (struct pt_regs *regs)
{
/* kernel */
trace->pid = -1;
trace->pid = current->pid;
trace->truncated = 0;
trace->n_addresses = 1;
trace->addresses[0] = 0x0;
/* 0x1 is taken by sysprof to mean "in kernel" */
trace->addresses[0] = (void *)0x1;
}
else
{

View File

@ -342,17 +342,26 @@ process_lookup_symbol (Process *process, gulong address)
{
static Symbol undefined;
const Symbol *result;
static Symbol kernel;
Map *map = process_locate_map (process, address);
/* g_print ("addr: %x\n", address); */
if (!map)
{
if (undefined.name)
g_free (undefined.name);
undefined.name = g_strdup_printf ("??? %s", process->cmdline);
undefined.address = 0xBABE0001;
if (address == 0x1)
{
kernel.name = "in kernel";
kernel.address = 0x0001337;
return &kernel;
}
else
{
if (undefined.name)
g_free (undefined.name);
undefined.name = g_strdup_printf ("??? %s", process->cmdline);
undefined.address = 0xBABE0001;
}
#if 0
g_print ("no map for %p (%s)\n", address, process->cmdline);
#endif