Loading...
Searching...
No Matches
__ktrace-impl.h
Go to the documentation of this file.
/*
* (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
* Björn Döbel <doebel@os.inf.tu-dresden.de>,
* Torsten Frenzel <frenzel@os.inf.tu-dresden.de>
* economic rights: Technische Universität Dresden (Germany)
*
* License: see LICENSE.spdx (in this directory or the directories above)
*/
#pragma once
#include <l4/sys/types.h>
#include <l4/sys/kdebug.h>
/*****************************************************************************
*** Implementation
*****************************************************************************/
L4_INLINE l4_umword_t
fiasco_tbuf_log(const char *text)
{
enum { TBUF_LOG = L4_KDEBUG_GROUP_TRACE + 0x01 };
return l4_error(__kdebug_text(TBUF_LOG, text, __builtin_strlen(text)));
}
L4_INLINE l4_umword_t
fiasco_tbuf_log_3val(const char *text, l4_umword_t v1, l4_umword_t v2,
l4_umword_t v3)
{
enum { TBUF_LOG_3VAL = L4_KDEBUG_GROUP_TRACE + 0x04 };
return l4_error(__kdebug_3_text(TBUF_LOG_3VAL, text,
__builtin_strlen(text), v1, v2, v3));
}
L4_INLINE void
fiasco_tbuf_clear(void)
{
enum { TBUF_CLEAR = L4_KDEBUG_GROUP_TRACE + 0x02 };
__kdebug_op(TBUF_CLEAR);
}
L4_INLINE void
fiasco_tbuf_dump(void)
{
enum { TBUF_DUMP = L4_KDEBUG_GROUP_TRACE + 0x03 };
__kdebug_op(TBUF_DUMP);
}
L4_INLINE l4_umword_t
fiasco_tbuf_log_binary(const unsigned char *data)
{
enum { TBUF_LOG_BIN = L4_KDEBUG_GROUP_TRACE + 0x08 };
return l4_error(__kdebug_text(TBUF_LOG_BIN, (const char *)data, 24));
}
fiasco_tbuf_log
l4_umword_t fiasco_tbuf_log(const char *text)
Create new trace-buffer entry with describing <text>.
Definition __ktrace-impl.h:24
fiasco_tbuf_clear
void fiasco_tbuf_clear(void)
Clear trace-buffer.
Definition __ktrace-impl.h:40
fiasco_tbuf_log_3val
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.
Definition __ktrace-impl.h:31
fiasco_tbuf_log_binary
l4_umword_t fiasco_tbuf_log_binary(const unsigned char *data)
Create new trace-buffer entry with binary data.
Definition __ktrace-impl.h:54
fiasco_tbuf_dump
void fiasco_tbuf_dump(void)
Dump trace-buffer to kernel console.
Definition __ktrace-impl.h:47
l4_umword_t
unsigned long l4_umword_t
Unsigned machine word.
Definition l4int.h:40
l4_error
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
L4_INLINE
#define L4_INLINE
L4 Inline function attribute.
Definition compiler.h:51
kdebug.h
Functionality for invoking the kernel debugger.
__kdebug_3_text
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
__kdebug_text
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
__kdebug_op
l4_msgtag_t __kdebug_op(unsigned op) L4_NOTHROW
Invoke a nullary operation on the base debugger capability.
Definition kdebug.h:68
types.h
Common L4 ABI Data Types.