git: flame_graph - Add initial code to support flame graphs

Matthew Dillon dillon at crater.dragonflybsd.org
Thu Feb 27 11:48:38 PST 2020


commit 91dc43dd1215cf13344c65a8f9478bfd31b95814
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Thu Feb 27 11:47:15 2020 -0800

    flame_graph - Add initial code to support flame graphs
    
    * Add better PC sampling code to the kernel, capable of generating
      call stack traces.
    
    * Implement an initial flame_graph utility.
    
      flame_graph > /tmp/x.out &
      (let it run a while)
    
      flame_graph -p < /tmp/x.out
    
    Requested-by: mjg

Summary of changes:
 sys/cpu/x86_64/include/cpufunc.h      |   3 +
 sys/dev/crypto/rdrand/rdrand.c        |   8 +-
 sys/kern/kern_clock.c                 |   5 +-
 sys/kern/kern_systimer.c              |   7 +-
 sys/platform/pc64/apic/apic_vector.s  |   6 +-
 sys/platform/pc64/conf/files          |   1 +
 sys/platform/pc64/x86_64/mp_flame.c   | 200 ++++++++++++++++++++++++++++++++++
 sys/platform/pc64/x86_64/mp_machdep.c |   3 +
 sys/sys/flame_graph.h                 |  25 +++++
 sys/sys/systimer.h                    |   1 +
 usr.bin/Makefile                      |   1 +
 usr.bin/flame_graph/Makefile          |  10 ++
 usr.bin/flame_graph/collect.c         | 179 ++++++++++++++++++++++++++++++
 usr.bin/flame_graph/flame.h           |  48 ++++++++
 usr.bin/flame_graph/main.c            |  63 +++++++++++
 usr.bin/flame_graph/process.c         | 137 +++++++++++++++++++++++
 usr.bin/systat/symbols.c              |  64 ++++++-----
 17 files changed, 725 insertions(+), 36 deletions(-)
 create mode 100644 sys/platform/pc64/x86_64/mp_flame.c
 create mode 100644 sys/sys/flame_graph.h
 create mode 100644 usr.bin/flame_graph/Makefile
 create mode 100644 usr.bin/flame_graph/collect.c
 create mode 100644 usr.bin/flame_graph/flame.h
 create mode 100644 usr.bin/flame_graph/main.c
 create mode 100644 usr.bin/flame_graph/process.c

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/91dc43dd1215cf13344c65a8f9478bfd31b95814


-- 
DragonFly BSD source repository



More information about the Commits mailing list