RTEMS 6.1-rc1
rtems-rfs-trace.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
16/*
17 * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
18 *
19 * Redistribution and use in source and binary forms, with or without
20 * modification, are permitted provided that the following conditions
21 * are met:
22 * 1. Redistributions of source code must retain the above copyright
23 * notice, this list of conditions and the following disclaimer.
24 * 2. Redistributions in binary form must reproduce the above copyright
25 * notice, this list of conditions and the following disclaimer in the
26 * documentation and/or other materials provided with the distribution.
27 *
28 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
32 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
33 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
34 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
35 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
36 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
37 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38 * POSSIBILITY OF SUCH DAMAGE.
39 */
40
41
42#if !defined (_RTEMS_RFS_TRACE_H_)
43#define _RTEMS_RFS_TRACE_H_
44
45#include <stddef.h>
46#include <stdbool.h>
47#include <stdint.h>
48#include <stdio.h>
49
53#if !defined (RTEMS_RFS_TRACE)
54#define RTEMS_RFS_TRACE 1
55#endif
56
60typedef uint64_t rtems_rfs_trace_mask;
61
65#define RTEMS_RFS_TRACE_ALL (0xffffffffffffffffULL)
66#define RTEMS_RFS_TRACE_OPEN (1ULL << 0)
67#define RTEMS_RFS_TRACE_CLOSE (1ULL << 1)
68#define RTEMS_RFS_TRACE_MUTEX (1ULL << 2)
69#define RTEMS_RFS_TRACE_BUFFER_OPEN (1ULL << 3)
70#define RTEMS_RFS_TRACE_BUFFER_CLOSE (1ULL << 4)
71#define RTEMS_RFS_TRACE_BUFFER_SYNC (1ULL << 5)
72#define RTEMS_RFS_TRACE_BUFFER_RELEASE (1ULL << 6)
73#define RTEMS_RFS_TRACE_BUFFER_CHAINS (1ULL << 7)
74#define RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST (1ULL << 8)
75#define RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE (1ULL << 9)
76#define RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE (1ULL << 10)
77#define RTEMS_RFS_TRACE_BUFFERS_RELEASE (1ULL << 11)
78#define RTEMS_RFS_TRACE_BLOCK_FIND (1ULL << 12)
79#define RTEMS_RFS_TRACE_BLOCK_MAP_GROW (1ULL << 13)
80#define RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK (1ULL << 14)
81#define RTEMS_RFS_TRACE_GROUP_OPEN (1ULL << 15)
82#define RTEMS_RFS_TRACE_GROUP_CLOSE (1ULL << 16)
83#define RTEMS_RFS_TRACE_GROUP_BITMAPS (1ULL << 17)
84#define RTEMS_RFS_TRACE_INODE_OPEN (1ULL << 18)
85#define RTEMS_RFS_TRACE_INODE_CLOSE (1ULL << 19)
86#define RTEMS_RFS_TRACE_INODE_LOAD (1ULL << 20)
87#define RTEMS_RFS_TRACE_INODE_UNLOAD (1ULL << 21)
88#define RTEMS_RFS_TRACE_INODE_CREATE (1ULL << 22)
89#define RTEMS_RFS_TRACE_INODE_DELETE (1ULL << 23)
90#define RTEMS_RFS_TRACE_LINK (1ULL << 24)
91#define RTEMS_RFS_TRACE_UNLINK (1ULL << 25)
92#define RTEMS_RFS_TRACE_DIR_LOOKUP_INO (1ULL << 26)
93#define RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK (1ULL << 27)
94#define RTEMS_RFS_TRACE_DIR_LOOKUP_INO_FOUND (1ULL << 28)
95#define RTEMS_RFS_TRACE_DIR_ADD_ENTRY (1ULL << 29)
96#define RTEMS_RFS_TRACE_DIR_DEL_ENTRY (1ULL << 30)
97#define RTEMS_RFS_TRACE_DIR_READ (1ULL << 31)
98#define RTEMS_RFS_TRACE_DIR_EMPTY (1ULL << 32)
99#define RTEMS_RFS_TRACE_SYMLINK (1ULL << 33)
100#define RTEMS_RFS_TRACE_SYMLINK_READ (1ULL << 34)
101#define RTEMS_RFS_TRACE_FILE_OPEN (1ULL << 35)
102#define RTEMS_RFS_TRACE_FILE_CLOSE (1ULL << 36)
103#define RTEMS_RFS_TRACE_FILE_IO (1ULL << 37)
104#define RTEMS_RFS_TRACE_FILE_SET (1ULL << 38)
105
115#if RTEMS_RFS_TRACE
117#else
118#define rtems_rfs_trace(_m) (0)
119#endif
120
128#if RTEMS_RFS_TRACE
130#else
131#define rtems_rfs_trace_set_mask(_m)
132#endif
133
141#if RTEMS_RFS_TRACE
143#else
144#define rtems_rfs_trace_clear_mask(_m)
145#endif
146
150#if RTEMS_RFS_TRACE
151int rtems_rfs_trace_shell_command (int argc, char *argv[]);
152#endif
153
154#endif
uint64_t rtems_rfs_trace_mask
Definition: rtems-rfs-trace.h:60
int rtems_rfs_trace_shell_command(int argc, char *argv[])
bool rtems_rfs_trace(rtems_rfs_trace_mask mask)
rtems_rfs_trace_mask rtems_rfs_trace_set_mask(rtems_rfs_trace_mask mask)
rtems_rfs_trace_mask rtems_rfs_trace_clear_mask(rtems_rfs_trace_mask mask)