Sophie

Sophie

distrib > CentOS > 6 > i386 > by-pkgid > 2c51d8eb79f8810ada971ee8c30ce1e5 > files > 226

kernel-doc-2.6.32-71.14.1.el6.noarch.rpm

<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>Chapter&#160;2.&#160;Howto use debugobjects</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="Debug objects life time" /><link rel="up" href="index.html" title="Debug objects life time" /><link rel="prev" href="ch01.html" title="Chapter&#160;1.&#160;Introduction" /><link rel="next" href="ch03.html" title="Chapter&#160;3.&#160;Debug functions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter&#160;2.&#160;Howto use debugobjects</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch01.html">Prev</a>&#160;</td><th width="60%" align="center">&#160;</th><td width="20%" align="right">&#160;<a accesskey="n" href="ch03.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter&#160;2.&#160;Howto use debugobjects"><div class="titlepage"><div><div><h2 class="title"><a id="howto"></a>Chapter&#160;2.&#160;Howto use debugobjects</h2></div></div></div><p>
      A kernel subsystem needs to provide a data structure which
      describes the object type and add calls into the debug code at
      appropriate places. The data structure to describe the object
      type needs at minimum the name of the object type. Optional
      functions can and should be provided to fixup detected problems
      so the kernel can continue to work and the debug information can
      be retrieved from a live system instead of hard core debugging
      with serial consoles and stack trace transcripts from the
      monitor.
    </p><p>
      The debug calls provided by debugobjects are:
      </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>debug_object_init</p></li><li class="listitem"><p>debug_object_init_on_stack</p></li><li class="listitem"><p>debug_object_activate</p></li><li class="listitem"><p>debug_object_deactivate</p></li><li class="listitem"><p>debug_object_destroy</p></li><li class="listitem"><p>debug_object_free</p></li></ul></div><p>
      Each of these functions takes the address of the real object and
      a pointer to the object type specific debug description
      structure.
    </p><p>
      Each detected error is reported in the statistics and a limited
      number of errors are printk'ed including a full stack trace.
    </p><p>
      The statistics are available via /sys/kernel/debug/debug_objects/stats.
      They provide information about the number of warnings and the
      number of successful fixups along with information about the
      usage of the internal tracking objects and the state of the
      internal tracking objects pool.
    </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch01.html">Prev</a>&#160;</td><td width="20%" align="center">&#160;</td><td width="40%" align="right">&#160;<a accesskey="n" href="ch03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&#160;1.&#160;Introduction&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;Chapter&#160;3.&#160;Debug functions</td></tr></table></div></body></html>