File: panic.stp

package info (click to toggle)
systemtap 5.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 47,556 kB
  • sloc: cpp: 81,117; ansic: 54,933; xml: 49,795; exp: 43,595; sh: 11,526; python: 5,003; perl: 2,252; tcl: 1,312; makefile: 1,006; javascript: 149; lisp: 105; awk: 101; asm: 91; java: 70; sed: 16
file content (32 lines) | stat: -rw-r--r-- 1,092 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright (C) 2012 Red Hat Inc., Bryn M. Reeves <bmr@redhat.com>
//
// This file is part of systemtap, and is free software.  You can
// redistribute it and/or modify it under the terms of the GNU General
// Public License (GPL); either version 2, or (at your option) any
// later version.
//

// <tapsetdescription>
// Functions in the panic tapset allow a probe handler to invoke
// the system panic routine with a user-specified message.
//
// This may be used with a crash dump collection facility such as 
// kexec/kdump in order to capture data for post-mortem debugging.
//
// Due to the fact that this will bring the system to an immediate
// halt the functions in this tapset require guru mode.
// </tapsetdescription>

/**
 * sfunction panic - trigger a panic
 * @msg: message to pass to kernel's panic() function
 *
 * Description: This function triggers an immediate panic of the running
 * kernel with a user-specified panic message.
 * It requires guru mode.
 */
function panic(msg:string) %{
        /* guru */ /* unmodified-fnargs */
        panic("%s", STAP_ARG_msg);
%}