[ovs-git] [openvswitch/ovs] 5d0a62: utilities: Add gdb debug commands to dump lists an...

GitHub noreply at github.com
Wed May 16 22:43:15 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 5d0a62672d56631a40ef5dbbede21622899bc8f0
      https://github.com/openvswitch/ovs/commit/5d0a62672d56631a40ef5dbbede21622899bc8f0
  Author: Eelco Chaudron <echaudro at redhat.com>
  Date:   2018-05-16 (Wed, 16 May 2018)

  Changed paths:
    M utilities/gdb/ovs_gdb.py

  Log Message:
  -----------
  utilities: Add gdb debug commands to dump lists and pmd info

Adds back-end support for walking ovs cmaps, and the following
commands to the gdb script:

- Dump all poll_thread info added to a specific struct dp_netdev*.
  Usage: ovs_dump_dp_netdev_poll_threads <struct dp_netdev *>

- Dump all nodes of an ovs_list:
    Usage: ovs_dump_ovs_list <struct ovs_list *> {[<structure>] [<member>] {dump}]}

    For example dump all the none quiescent OvS RCU threads:

      (gdb) ovs_dump_ovs_list &ovsrcu_threads
      (struct ovs_list *) 0x7f2a14000900
      (struct ovs_list *) 0x7f2acc000900
      (struct ovs_list *) 0x7f2a680668d0

    This is not very useful, so please use this with the container_of mode:

      (gdb) ovs_dump_ovs_list &ovsrcu_threads 'struct ovsrcu_perthread' list_node
      (struct ovsrcu_perthread *) 0x7f2a14000900
      (struct ovsrcu_perthread *) 0x7f2acc000900
      (struct ovsrcu_perthread *) 0x7f2a680668d0

    Now you can manually use the print command to show the content, or use the
    dump option to dump the structure for all nodes:

      (gdb) ovs_dump_ovs_list &ovsrcu_threads 'struct ovsrcu_perthread' list_node dump
      (struct ovsrcu_perthread *) 0x7f2a14000900 =
  {list_node = {prev = 0xf48e80 <ovsrcu_threads>, next = 0x7f2acc000900}, mutex...

      (struct ovsrcu_perthread *) 0x7f2acc000900 =
  {list_node = {prev = 0x7f2a14000900, next = 0x7f2a680668d0}, mutex ...

      (struct ovsrcu_perthread *) 0x7f2a680668d0 =
  {list_node = {prev = 0x7f2acc000900, next = 0xf48e80 <ovsrcu_threads>}, ...

Signed-off-by: Eelco Chaudron <echaudro at redhat.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>



      **NOTE:** This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the git mailing list