All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/8] Function tracing support for pstore
@ 2012-07-10  0:10 Anton Vorontsov
  2012-07-10  0:10 ` [PATCH 1/8] tracing: Fix initialization failure path in tracing_set_tracer() Anton Vorontsov
                   ` (9 more replies)
  0 siblings, 10 replies; 40+ messages in thread
From: Anton Vorontsov @ 2012-07-10  0:10 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Kees Cook, Colin Cross, Tony Luck,
	Steven Rostedt, Frederic Weisbecker, Ingo Molnar
  Cc: Arnd Bergmann, John Stultz, Shuah Khan, arve,
	Rebecca Schultz Zavin, Jesper Juhl, Randy Dunlap, Stephen Boyd,
	Thomas Meyer, Andrew Morton, Marco Stornelli, WANG Cong,
	linux-kernel, devel, linaro-kernel, patches, kernel-team

Hi all,

In v4:
- A few cosmetic changes in func_set_flag(), as suggested by Steven
  Rostedt. Firstly, in the patch that adds pstore option, I use
  'else if' for the new bit (it keeps changes minimal), but then there
  is a new separate patch (the last in the series) that converts the
  whole thing into a switch construction.

In v3:
- Make traces versioned, as suggested by Steven, Tony and Colin. (The
  version tag is stored in the PRZ signature, see the last patch for
  the implementation details).
- Add Steven's Ack on the first patch.

In v2:
- Do not introduce a separate 'persistent' tracer, but introduce an
  option to the existing 'function' tracer.

Rationale for this patch set:

With this support kernel can save functions call chain log into a
persistent ram buffer that can be decoded and dumped after reboot
through pstore filesystem. It can be used to determine what function
was last called before a hang or an unexpected reset (caused by, for
example, a buggy driver that abuses HW).

Here's a "nano howto", to get the idea:

 # mount -t debugfs debugfs /sys/kernel/debug/
 # cd /sys/kernel/debug/tracing
 # echo function > current_tracer
 # echo 1 > options/func_pstore
 # reboot -f
 [...]
 # mount -t pstore pstore /mnt/
 # tail /mnt/ftrace-ramoops
 0 ffffffff8101ea64  ffffffff8101bcda  native_apic_mem_read <- disconnect_bsp_APIC+0x6a/0xc0
 0 ffffffff8101ea44  ffffffff8101bcf6  native_apic_mem_write <- disconnect_bsp_APIC+0x86/0xc0
 0 ffffffff81020084  ffffffff8101a4b5  hpet_disable <- native_machine_shutdown+0x75/0x90
 0 ffffffff81005f94  ffffffff8101a4bb  iommu_shutdown_noop <- native_machine_shutdown+0x7b/0x90
 0 ffffffff8101a6a1  ffffffff8101a437  native_machine_emergency_restart <- native_machine_restart+0x37/0x40
 0 ffffffff811f9876  ffffffff8101a73a  acpi_reboot <- native_machine_emergency_restart+0xaa/0x1e0
 0 ffffffff8101a514  ffffffff8101a772  mach_reboot_fixups <- native_machine_emergency_restart+0xe2/0x1e0
 0 ffffffff811d9c54  ffffffff8101a7a0  __const_udelay <- native_machine_emergency_restart+0x110/0x1e0
 0 ffffffff811d9c34  ffffffff811d9c80  __delay <- __const_udelay+0x30/0x40
 0 ffffffff811d9d14  ffffffff811d9c3f  delay_tsc <- __delay+0xf/0x20

Mostly the code comes from trace_persistent.c driver found in the
Android git tree, written by Colin Cross <ccross@android.com>
(according to sign-off history). I reworked the driver a little bit,
and ported it to pstore subsystem.

---
 Documentation/ramoops.txt      |   25 +++++++++
 fs/pstore/Kconfig              |   13 +++++
 fs/pstore/Makefile             |    1 +
 fs/pstore/ftrace.c             |   35 +++++++++++++
 fs/pstore/inode.c              |  111 ++++++++++++++++++++++++++++++++++++++--
 fs/pstore/internal.h           |   43 ++++++++++++++++
 fs/pstore/platform.c           |   12 ++++-
 fs/pstore/ram.c                |   65 +++++++++++++++++------
 fs/pstore/ram_core.c           |   12 +++--
 include/linux/pstore.h         |   13 +++++
 include/linux/pstore_ram.h     |    3 +-
 kernel/trace/trace.c           |    7 +--
 kernel/trace/trace_functions.c |   36 +++++++++----
 13 files changed, 337 insertions(+), 39 deletions(-)

-- 
Anton Vorontsov
Email: cbouatmailru@gmail.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2012-08-22  2:25 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-10  0:10 [PATCH v4 0/8] Function tracing support for pstore Anton Vorontsov
2012-07-10  0:10 ` [PATCH 1/8] tracing: Fix initialization failure path in tracing_set_tracer() Anton Vorontsov
2012-07-10  0:10 ` [PATCH 2/8] pstore: Introduce write_buf backend callback Anton Vorontsov
2012-07-10  0:10 ` [PATCH 3/8] pstore: Add persistent function tracing Anton Vorontsov
2012-07-17 19:38   ` Steven Rostedt
2012-07-17 20:01     ` Anton Vorontsov
2012-07-17 21:38       ` Steven Rostedt
2012-07-17 22:06         ` Anton Vorontsov
2012-07-18  3:47         ` [PATCH] pstore/ftrace: Convert to its own enable/disable debugfs knob Anton Vorontsov
2012-07-18  7:26           ` Anton Vorontsov
2012-07-18 13:13             ` Steven Rostedt
2012-07-18 13:10           ` Steven Rostedt
2012-07-18 18:24             ` [PATCH v2] " Anton Vorontsov
2012-07-18 17:12           ` [PATCH] " Stephen Boyd
2012-07-18 18:50             ` Anton Vorontsov
2012-07-18 18:59               ` Stephen Boyd
2012-07-18 19:30                 ` [PATCH v3] " Anton Vorontsov
2012-08-21  1:46                   ` Anton Vorontsov
2012-08-22  1:07                     ` Steven Rostedt
2012-08-22  2:10                       ` Anton Vorontsov
2012-08-22  2:25                         ` Steven Rostedt
2012-07-10  0:10 ` [PATCH 4/8] tracing/function: Introduce persistent trace option Anton Vorontsov
2012-07-10 12:58   ` Steven Rostedt
2012-07-10  0:10 ` [PATCH 5/8] pstore/ram: Convert to write_buf callback Anton Vorontsov
2012-07-10  0:10 ` [PATCH 6/8] pstore/ram: Add ftrace messages handling Anton Vorontsov
2012-07-10  0:10 ` [PATCH 7/8] pstore/ram: Make tracing log versioned Anton Vorontsov
2012-07-17 16:56   ` Greg Kroah-Hartman
2012-07-17 17:09     ` Anton Vorontsov
2012-07-17 18:09     ` Anton Vorontsov
2012-07-17 18:13       ` [PATCH] pstore: Headers should include all stuff they use Anton Vorontsov
2012-07-17 18:19         ` Greg Kroah-Hartman
2012-07-17 18:37           ` Anton Vorontsov
2012-07-17 19:15             ` Greg Kroah-Hartman
2012-07-17 18:18       ` [PATCH 7/8] pstore/ram: Make tracing log versioned Greg Kroah-Hartman
2012-07-17 19:11     ` [PATCH fixed] " Anton Vorontsov
2012-07-10  0:10 ` [PATCH 8/8] tracing/function: Convert func_set_flag() to a switch statement Anton Vorontsov
2012-07-10 12:01 ` [PATCH v4 0/8] Function tracing support for pstore Arnd Bergmann
2012-07-10 13:00   ` Steven Rostedt
2012-07-16  7:14 ` Anton Vorontsov
2012-07-16 14:53   ` Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.