1TRACE-CMD-MEM(1)               libtracefs Manual              TRACE-CMD-MEM(1)
2
3
4

NAME

6       trace-cmd-mem - show memory usage of certain kmem events
7

SYNOPSIS

9       trace-cmd mem [OPTIONS][input-file]
10

DESCRIPTION

12       The trace-cmd(1) mem requires a trace-cmd record that enabled the
13       following events:
14
15           kmalloc
16           kmalloc_node
17           kfree
18           kmem_cache_alloc
19           kmem_cache_alloc_node
20           kmem_cache_alloc_free
21
22       It then reads the amount requested and the ammount freed as well as the
23       functions that called the allocation. It then reports the final amount
24       of bytes requested and allocated, along with the total amount allocated
25       and requested, as well as the max allocation and requested during the
26       run. It reports the amount of wasted bytes (allocated - requested) that
27       was not freed, as well as the max wasted amount during the run. The
28       list is sorted by descending order of wasted bytes after the run.
29
30                   Function                Waste   Alloc   req             TotAlloc     TotReq             MaxAlloc     MaxReq     MaxWaste
31                   --------                -----   -----   ---             --------     ------             --------     ------     --------
32             rb_allocate_cpu_buffer        768     2304    1536                2304       1536                 2304       1536     768
33                    alloc_pipe_info        400     1152    752                 1152        752                 1152        752     400
34                     instance_mkdir        252     544     292                  544        292                  544        292     252
35                          __d_alloc        215     1086560 1086345          1087208    1086993              1086560    1086345     215
36                     get_empty_filp        72      2304    2232                4864       4712                 4864       4712     152
37                           mm_alloc        40      960     920                  960        920                  960        920     40
38                      prepare_creds        32      192     160                 1728       1440                 1728       1440     288
39               tracing_buffers_open        8       32      24                    32         24                   32         24     8
40                             do_brk        0       0       0                    368        368                  368        368     0
41           journal_add_journal_head        0       6048    6048                6048       6048                 6048       6048     0
42                      journal_start        0       0       0                   1224       1224                   48         48     0
43                __rb_allocate_pages        0       3289856 3289856          3289856    3289856              3289856    3289856     0
44                     anon_vma_alloc        0       0       0                    936        936                  864        864     0
45                                                                   [...]
46

OPTIONS

48       -i input-file
49           By default, trace-cmd hist will read the file trace.dat. But the -i
50           option open up the given input-file instead. Note, the input file
51           may also be specified as the last item on the command line.
52

SEE ALSO

54       trace-cmd(1), trace-cmd-record(1), trace-cmd-report(1),
55       trace-cmd-start(1), trace-cmd-stop(1), trace-cmd-extract(1),
56       trace-cmd-reset(1), trace-cmd-hist(1), trace-cmd-split(1),
57       trace-cmd-listen(1)
58

AUTHOR

60       Written by Steven Rostedt, <rostedt@goodmis.org[1]>
61

RESOURCES

63       https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
64

COPYING

66       Copyright (C) 2013 Red Hat, Inc. Free use of this software is granted
67       under the terms of the GNU Public License (GPL).
68

NOTES

70        1. rostedt@goodmis.org
71           mailto:rostedt@goodmis.org
72
73
74
75libtracefs                        10/11/2022                  TRACE-CMD-MEM(1)
Impressum