summaryrefslogtreecommitdiffstats
path: root/src/lib/ssx_dump.h
blob: 17455c0198354005fe7e21bbfa16c3b018ad0225 (plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef __SSX_DUMP_H__
#define __SSX_DUMP_H__

// $Id: ssx_dump.h,v 1.1.1.1 2013/12/11 20:49:20 bcbrock Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/lib/ssx_dump.h,v $
//-----------------------------------------------------------------------------
// *! (C) Copyright International Business Machines Corp. 2013
// *! All Rights Reserved -- Property of IBM
// *! *** IBM Confidential ***
//-----------------------------------------------------------------------------

/// \file ssx_dump.h 
/// \brief Routines for dumping SSX kernel data structures

#include "ssx.h"

/// \defgroup ssx_dump_options Options for ssx_dump()
///
/// No options are currently specified.
///
/// @{

/// @}

#ifndef __ASSEMBLER__

/// Dump the kernel state
///
/// \param i_stream The stream to receive the dump.  If the dump is being
/// generated prior to a kernel panic then this would typically be \a ssxout,
/// the stream used by printk.
///
/// \param i_options AN OR-mask of option flags; See \ref ssx_dump_options
///
/// The SSX kernel dump produces a formatted snapshot of the state of the
/// kernel and the mapped threads. This API does not manipulate the machine
/// context; If it is required to produce a precise snapshot then the caller
/// will need to make the call from a critical section.
///
/// The following information is standard in the dump
///
/// - The interrupt and thread state of the kernel
/// - The state of each thread
/// - A stack trace for each thread
///
/// Options : TBD
///
/// \bug There are likely several bugs in the current implementation due to
/// the assumption that the code is being called from a state in which the
/// kernel context is not changing. We don't have time to code and test the
/// most general implementation now.  To guarantee correct operation the API
/// must currently be called from an SSX_CRITICAL critical section.
void
ssx_dump(FILE* stream, int options);

#endif // __ASSEMBLER__

#endif // __SSX_DUMP_H__
OpenPOWER on IntegriCloud