Line 59: | Line 59: | ||
3. What are the expected results of those actions? | 3. What are the expected results of those actions? | ||
--> | --> | ||
No special hardware is needed. | |||
You will need to install the gdb-heap package (not yet packaged) | |||
=== Exploratory testing === | |||
* Pick a process on your system (either as root, or one of your own processes) | |||
* Use "gdb attach PID" to connect to it | |||
* Use <code>python import heap</code> to register the "heap" command | |||
* Use the "heap" command and its various subcommands (as described on [https://fedorahosted.org/gdb-heap/wiki the upstream website]) | |||
* Ensure that all results look correct, and that there are no Python tracebacks within gdb. | |||
Ideally the amount of "uncategorized" data should not be a substantial proportion of the overall size of the dynamically-allocated memory; if it is, then that may be a bug. | |||
== User Experience == | == User Experience == |
Revision as of 22:38, 8 July 2010
Memory Debugging Tools
Summary
The gdb debugger has been extended with new commands that make it easier to track down and fix excessive memory usage within programs and libraries.
This functionality was created by Fedora contributor David Malcolm, and we believe it is unique to Fedora.
Owner
- Name: Dave Malcolm
- Email: <dmalcolm@redhat.com>
Current status
- Targeted release: Fedora 42
- Last updated: 2010-07-08
- Percentage of completion: 20%
Preparing upstream project for initial launch: https://fedorahosted.org/gdb-heap/
Initial version of code uploaded
Upstream tickets:
Detailed Description
Benefit to Fedora
This feature could be of great use to developers and system administrators: it provides a new way of analyzing how a process uses memory, without requiring advance planning.
It is unique to Fedora (it makes heavy use of the gdb/python integration we have in Fedora), and was developed by a Fedora contributor (who is a Red Hat engineer).
Scope
How To Test
No special hardware is needed.
You will need to install the gdb-heap package (not yet packaged)
Exploratory testing
- Pick a process on your system (either as root, or one of your own processes)
- Use "gdb attach PID" to connect to it
- Use
python import heap
to register the "heap" command - Use the "heap" command and its various subcommands (as described on the upstream website)
- Ensure that all results look correct, and that there are no Python tracebacks within gdb.
Ideally the amount of "uncategorized" data should not be a substantial proportion of the overall size of the dynamically-allocated memory; if it is, then that may be a bug.
User Experience
Dependencies
There's a baseline of functionality that I'm developing on top of Fedora 13's gdb.
Some features require additional work in gdb, which I've filed RFE bugs for. Naturally this will require coordination with gdb to ensure that they land in Fedora 14:
- RHBZ #610241: RFE: please expose "info symbol ADDRESS" in the python API
- RHBZ #610249: RFE: notification about changes in the inferior process
Contingency Plan
None necessary, simply remove the package