Site Home Page
The UML Wiki
UML Community Site
The UML roadmap
What it's good for
Case Studies
Kernel Capabilities
Downloading it
Running it
Compiling
Installation
Skas Mode
Incremental Patches
Test Suite
Host memory use
Building filesystems
Troubles
User Contributions
Related Links
The ToDo list
Projects
Diary
Thanks
Contacts
Tutorials
The HOWTO (html)
The HOWTO (text)
Host file access
Device inputs
Sharing filesystems
Creating filesystems
Resizing filesystems
Virtual Networking
Management Console
Kernel Debugging
UML Honeypots
gprof and gcov
Running X
Diagnosing problems
Configuration
Installing Slackware
Porting UML
IO memory emulation
UML on 2G/2G hosts
Adding a UML system call
Running nested UMLs
How you can help
Overview
Documentation
Utilities
Kernel bugs
Kernel projects
Screenshots
A virtual network
An X session
Transcripts
A login session
A debugging session
Slackware installation
Reference
Kernel switches
Slackware README
Papers
ALS 2000 paper (html)
ALS 2000 paper (TeX)
ALS 2000 slides
LCA 2001 slides
OLS 2001 paper (html)
OLS 2001 paper (TeX)
ALS 2001 paper (html)
ALS 2001 paper (TeX)
UML security (html)
LCA 2002 (html)
WVU 2002 (html)
Security Roundtable (html)
OLS 2002 slides
LWE 2005 slides
Fun and Games
Kernel Hangman
Disaster of the Month

Running gprof and gcov

gprof and gcov support in UML is present in CVS as of 17 Apr 2001. I sent it to Alan for inclusion in the ac tree, and it will be in my 2.4.4 release.
gprof
To use gprof with UML, you do the following
  • Configure with gprof support - this is "enable gprof support" under "Kernel Hacking". You'll need to turn on "kernel debugging symbols" first.
  • Build UML.
  • Boot it up and run your tests in it.
  • Halt it, and the standard gmon.out file will be written out. Run gprof as you would with any other process
    host% gprof linux
    and you will get the standard reams of gprof output.
Here is gprof output from several hours of a thrashing UML. There is some commentary on it in this entry of the UML diary.
gcov
Using gcov with UML is similar:
  • Configure with gprof support - this is "enable gcov support" under "Kernel Hacking". You'll need to turn on "kernel debugging symbols" first.
  • Build UML.
  • Boot it up and run your tests in it.
  • Halt UML, and every file in the kernel that has coverage data will get a 'file.da' file. In order to see what coverage of a particular file you achieved with your tests, run
    host% gcov file.c
    This will produce 'file.c.gcov', which is 'file.c' annotated with line-by-line coverage information.
Hosted at SourceForge Logo