Re: Finding Hot Paths in Linux Drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 07, 2002 at 02:23:46PM -0800, Brad Remedios wrote:
> I was wondering if anyone has any ideas or knows of any applications
> that could be used to locate the hot paths in a kernel driver without
> having to look through the code or do much modification to it.
> Basically, we are looking for a way to profile where the kernel code
> spends its time so we may concentrate on certain areas if we need to.

There's Oprofile for x86 linux, I don't know if somebody ported it to
(Strong)ARM (movement?). There was also a profiling module from Compaq
WRL in the latest -np kernels that used OSMR2. Never tried it, though.

> I would also be interested in finding out how much time is spent trying
> to Access IO Mode and Memory Mode Devices to see if we can also speed
> that up.

StrongARM doesn't have IO space. The only thing that can be abused as a
"sort of" IO space is the PCMCIA IO space for PCMCIA slot 0 and 1.

> I am using a StrongARM Processor with Linux Kernel 2.4.0 with Russell
> Kings (rmk2) patch and Nicolas Pitre's np2 patch.  Changing kernels
> is not a desired option (avoided if possible).  (2.4.0-rmk2-np2).

It's your choice not to upgrade. 2.4.0-rmk2-np2 is an ancient kernel,
it has *lots* of known bugs, most noticably the IDE, halfword access,
and VM bugs, but there are others as well. Don't say I didn't warn you.

> We do have access to the Data and Address Bus externally, along with
> some of the GPIO pins.  The only real way I can see being able to do
> the tests is by making certain GPIO pins go high during certain parts
> of the code as we would be able to time how long it was asserted for
> but would rather a better, solution if possible.

Access to address and data bus doesn't help you, the CPU has cache so
you will miss quite a lot of accesses. The MMU will also make the
access pattern completely useless, the kernel works with virtual
addresses, while you will see the physical addresses on the bus. There
is no way to relate the virtual<-->physical mapping on the fly.

Be careful that you can exceed the electrical load of the bus and
create random crashes by doing so (been there, done that).


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Faculty
of Information Technology and Systems, Delft University of Technology,
PO BOX 5031, 2600 GA Delft, The Netherlands  Phone: +31-15-2783635
Fax: +31-15-2781843  Email: J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux