L4Re Operating System Framework
Interface and Usage Documentation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
__ktrace-impl.h
Go to the documentation of this file.
1
6/*
7 * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
8 * Björn Döbel <doebel@os.inf.tu-dresden.de>,
9 * Torsten Frenzel <frenzel@os.inf.tu-dresden.de>
10 * economic rights: Technische Universität Dresden (Germany)
11 *
12 * License: see LICENSE.spdx (in this directory or the directories above)
13 */
14#pragma once
15
16#include <l4/sys/types.h>
17#include <l4/sys/kdebug.h>
18
19/*****************************************************************************
20 *** Implementation
21 *****************************************************************************/
22
24fiasco_tbuf_log(const char *text)
25{
26 enum { TBUF_LOG = L4_KDEBUG_GROUP_TRACE + 0x01 };
27 return l4_error(__kdebug_text(TBUF_LOG, text, __builtin_strlen(text)));
28}
29
32 l4_umword_t v3)
33{
34 enum { TBUF_LOG_3VAL = L4_KDEBUG_GROUP_TRACE + 0x04 };
35 return l4_error(__kdebug_3_text(TBUF_LOG_3VAL, text,
36 __builtin_strlen(text), v1, v2, v3));
37}
38
39L4_INLINE void
41{
42 enum { TBUF_CLEAR = L4_KDEBUG_GROUP_TRACE + 0x02 };
43 __kdebug_op(TBUF_CLEAR);
44}
45
46L4_INLINE void
48{
49 enum { TBUF_DUMP = L4_KDEBUG_GROUP_TRACE + 0x03 };
50 __kdebug_op(TBUF_DUMP);
51}
52
54fiasco_tbuf_log_binary(const unsigned char *data)
55{
56 enum { TBUF_LOG_BIN = L4_KDEBUG_GROUP_TRACE + 0x08 };
57 return l4_error(__kdebug_text(TBUF_LOG_BIN, (const char *)data, 24));
58}
59
l4_umword_t fiasco_tbuf_log(const char *text)
Create new trace-buffer entry with describing <text>.
void fiasco_tbuf_clear(void)
Clear trace-buffer.
l4_umword_t fiasco_tbuf_log_3val(const char *text, l4_umword_t v1, l4_umword_t v2, l4_umword_t v3)
Create new trace-buffer entry with describing <text> and three additional values.
l4_umword_t fiasco_tbuf_log_binary(const unsigned char *data)
Create new trace-buffer entry with binary data.
void fiasco_tbuf_dump(void)
Dump trace-buffer to kernel console.
unsigned long l4_umword_t
Unsigned machine word.
Definition l4int.h:40
long l4_error(l4_msgtag_t tag) L4_NOTHROW
Get IPC error code if any or message tag label otherwise for an IPC call.
Definition ipc.h:646
#define L4_INLINE
L4 Inline function attribute.
Definition compiler.h:51
Functionality for invoking the kernel debugger.
l4_msgtag_t __kdebug_3_text(unsigned op, char const *text, unsigned len, l4_umword_t v1, l4_umword_t v2, l4_umword_t v3) L4_NOTHROW
Invoke a text output operation with 3 additional machine word arguments on the base debugger capabili...
Definition kdebug.h:139
l4_msgtag_t __kdebug_text(unsigned op, char const *text, unsigned len) L4_NOTHROW
Invoke a text output operation on the base debugger capability.
Definition kdebug.h:98
l4_msgtag_t __kdebug_op(unsigned op) L4_NOTHROW
Invoke a nullary operation on the base debugger capability.
Definition kdebug.h:68
Common L4 ABI Data Types.