Commit 90a5d5af authored by Konstantin Khlebnikov's avatar Konstantin Khlebnikov Committed by Linus Torvalds

mm-tracepoint: fix documentation and examples

We renamed the page-free mm tracepoints.
Signed-off-by: default avatarKonstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: default avatarMinchan Kim <minchan.kim@gmail.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b413d48a
...@@ -93,14 +93,14 @@ By specifying the -a switch and analysing sleep, the system-wide events ...@@ -93,14 +93,14 @@ By specifying the -a switch and analysing sleep, the system-wide events
for a duration of time can be examined. for a duration of time can be examined.
$ perf stat -a \ $ perf stat -a \
-e kmem:mm_page_alloc -e kmem:mm_page_free_direct \ -e kmem:mm_page_alloc -e kmem:mm_page_free \
-e kmem:mm_pagevec_free \ -e kmem:mm_page_free_batched \
sleep 10 sleep 10
Performance counter stats for 'sleep 10': Performance counter stats for 'sleep 10':
9630 kmem:mm_page_alloc 9630 kmem:mm_page_alloc
2143 kmem:mm_page_free_direct 2143 kmem:mm_page_free
7424 kmem:mm_pagevec_free 7424 kmem:mm_page_free_batched
10.002577764 seconds time elapsed 10.002577764 seconds time elapsed
...@@ -119,15 +119,15 @@ basis using set_ftrace_pid. ...@@ -119,15 +119,15 @@ basis using set_ftrace_pid.
Events can be activated and tracked for the duration of a process on a local Events can be activated and tracked for the duration of a process on a local
basis using PCL such as follows. basis using PCL such as follows.
$ perf stat -e kmem:mm_page_alloc -e kmem:mm_page_free_direct \ $ perf stat -e kmem:mm_page_alloc -e kmem:mm_page_free \
-e kmem:mm_pagevec_free ./hackbench 10 -e kmem:mm_page_free_batched ./hackbench 10
Time: 0.909 Time: 0.909
Performance counter stats for './hackbench 10': Performance counter stats for './hackbench 10':
17803 kmem:mm_page_alloc 17803 kmem:mm_page_alloc
12398 kmem:mm_page_free_direct 12398 kmem:mm_page_free
4827 kmem:mm_pagevec_free 4827 kmem:mm_page_free_batched
0.973913387 seconds time elapsed 0.973913387 seconds time elapsed
...@@ -146,8 +146,8 @@ to know what the standard deviation is. By and large, this is left to the ...@@ -146,8 +146,8 @@ to know what the standard deviation is. By and large, this is left to the
performance analyst to do it by hand. In the event that the discrete event performance analyst to do it by hand. In the event that the discrete event
occurrences are useful to the performance analyst, then perf can be used. occurrences are useful to the performance analyst, then perf can be used.
$ perf stat --repeat 5 -e kmem:mm_page_alloc -e kmem:mm_page_free_direct $ perf stat --repeat 5 -e kmem:mm_page_alloc -e kmem:mm_page_free
-e kmem:mm_pagevec_free ./hackbench 10 -e kmem:mm_page_free_batched ./hackbench 10
Time: 0.890 Time: 0.890
Time: 0.895 Time: 0.895
Time: 0.915 Time: 0.915
...@@ -157,8 +157,8 @@ occurrences are useful to the performance analyst, then perf can be used. ...@@ -157,8 +157,8 @@ occurrences are useful to the performance analyst, then perf can be used.
Performance counter stats for './hackbench 10' (5 runs): Performance counter stats for './hackbench 10' (5 runs):
16630 kmem:mm_page_alloc ( +- 3.542% ) 16630 kmem:mm_page_alloc ( +- 3.542% )
11486 kmem:mm_page_free_direct ( +- 4.771% ) 11486 kmem:mm_page_free ( +- 4.771% )
4730 kmem:mm_pagevec_free ( +- 2.325% ) 4730 kmem:mm_page_free_batched ( +- 2.325% )
0.982653002 seconds time elapsed ( +- 1.448% ) 0.982653002 seconds time elapsed ( +- 1.448% )
...@@ -168,15 +168,15 @@ aggregation of discrete events, then a script would need to be developed. ...@@ -168,15 +168,15 @@ aggregation of discrete events, then a script would need to be developed.
Using --repeat, it is also possible to view how events are fluctuating over Using --repeat, it is also possible to view how events are fluctuating over
time on a system-wide basis using -a and sleep. time on a system-wide basis using -a and sleep.
$ perf stat -e kmem:mm_page_alloc -e kmem:mm_page_free_direct \ $ perf stat -e kmem:mm_page_alloc -e kmem:mm_page_free \
-e kmem:mm_pagevec_free \ -e kmem:mm_page_free_batched \
-a --repeat 10 \ -a --repeat 10 \
sleep 1 sleep 1
Performance counter stats for 'sleep 1' (10 runs): Performance counter stats for 'sleep 1' (10 runs):
1066 kmem:mm_page_alloc ( +- 26.148% ) 1066 kmem:mm_page_alloc ( +- 26.148% )
182 kmem:mm_page_free_direct ( +- 5.464% ) 182 kmem:mm_page_free ( +- 5.464% )
890 kmem:mm_pagevec_free ( +- 30.079% ) 890 kmem:mm_page_free_batched ( +- 30.079% )
1.002251757 seconds time elapsed ( +- 0.005% ) 1.002251757 seconds time elapsed ( +- 0.005% )
...@@ -220,8 +220,8 @@ were generating events within the kernel. To begin this sort of analysis, the ...@@ -220,8 +220,8 @@ were generating events within the kernel. To begin this sort of analysis, the
data must be recorded. At the time of writing, this required root: data must be recorded. At the time of writing, this required root:
$ perf record -c 1 \ $ perf record -c 1 \
-e kmem:mm_page_alloc -e kmem:mm_page_free_direct \ -e kmem:mm_page_alloc -e kmem:mm_page_free \
-e kmem:mm_pagevec_free \ -e kmem:mm_page_free_batched \
./hackbench 10 ./hackbench 10
Time: 0.894 Time: 0.894
[ perf record: Captured and wrote 0.733 MB perf.data (~32010 samples) ] [ perf record: Captured and wrote 0.733 MB perf.data (~32010 samples) ]
...@@ -260,8 +260,8 @@ noticed that X was generating an insane amount of page allocations so let's look ...@@ -260,8 +260,8 @@ noticed that X was generating an insane amount of page allocations so let's look
at it: at it:
$ perf record -c 1 -f \ $ perf record -c 1 -f \
-e kmem:mm_page_alloc -e kmem:mm_page_free_direct \ -e kmem:mm_page_alloc -e kmem:mm_page_free \
-e kmem:mm_pagevec_free \ -e kmem:mm_page_free_batched \
-p `pidof X` -p `pidof X`
This was interrupted after a few seconds and This was interrupted after a few seconds and
......
...@@ -17,8 +17,8 @@ titan:~> perf list ...@@ -17,8 +17,8 @@ titan:~> perf list
kmem:kmem_cache_alloc_node [Tracepoint event] kmem:kmem_cache_alloc_node [Tracepoint event]
kmem:kfree [Tracepoint event] kmem:kfree [Tracepoint event]
kmem:kmem_cache_free [Tracepoint event] kmem:kmem_cache_free [Tracepoint event]
kmem:mm_page_free_direct [Tracepoint event] kmem:mm_page_free [Tracepoint event]
kmem:mm_pagevec_free [Tracepoint event] kmem:mm_page_free_batched [Tracepoint event]
kmem:mm_page_alloc [Tracepoint event] kmem:mm_page_alloc [Tracepoint event]
kmem:mm_page_alloc_zone_locked [Tracepoint event] kmem:mm_page_alloc_zone_locked [Tracepoint event]
kmem:mm_page_pcpu_drain [Tracepoint event] kmem:mm_page_pcpu_drain [Tracepoint event]
...@@ -29,15 +29,15 @@ measured. For example the page alloc/free properties of a 'hackbench ...@@ -29,15 +29,15 @@ measured. For example the page alloc/free properties of a 'hackbench
run' are: run' are:
titan:~> perf stat -e kmem:mm_page_pcpu_drain -e kmem:mm_page_alloc titan:~> perf stat -e kmem:mm_page_pcpu_drain -e kmem:mm_page_alloc
-e kmem:mm_pagevec_free -e kmem:mm_page_free_direct ./hackbench 10 -e kmem:mm_page_free_batched -e kmem:mm_page_free ./hackbench 10
Time: 0.575 Time: 0.575
Performance counter stats for './hackbench 10': Performance counter stats for './hackbench 10':
13857 kmem:mm_page_pcpu_drain 13857 kmem:mm_page_pcpu_drain
27576 kmem:mm_page_alloc 27576 kmem:mm_page_alloc
6025 kmem:mm_pagevec_free 6025 kmem:mm_page_free_batched
20934 kmem:mm_page_free_direct 20934 kmem:mm_page_free
0.613972165 seconds time elapsed 0.613972165 seconds time elapsed
...@@ -45,8 +45,8 @@ You can observe the statistical properties as well, by using the ...@@ -45,8 +45,8 @@ You can observe the statistical properties as well, by using the
'repeat the workload N times' feature of perf stat: 'repeat the workload N times' feature of perf stat:
titan:~> perf stat --repeat 5 -e kmem:mm_page_pcpu_drain -e titan:~> perf stat --repeat 5 -e kmem:mm_page_pcpu_drain -e
kmem:mm_page_alloc -e kmem:mm_pagevec_free -e kmem:mm_page_alloc -e kmem:mm_page_free_batched -e
kmem:mm_page_free_direct ./hackbench 10 kmem:mm_page_free ./hackbench 10
Time: 0.627 Time: 0.627
Time: 0.644 Time: 0.644
Time: 0.564 Time: 0.564
...@@ -57,8 +57,8 @@ You can observe the statistical properties as well, by using the ...@@ -57,8 +57,8 @@ You can observe the statistical properties as well, by using the
12920 kmem:mm_page_pcpu_drain ( +- 3.359% ) 12920 kmem:mm_page_pcpu_drain ( +- 3.359% )
25035 kmem:mm_page_alloc ( +- 3.783% ) 25035 kmem:mm_page_alloc ( +- 3.783% )
6104 kmem:mm_pagevec_free ( +- 0.934% ) 6104 kmem:mm_page_free_batched ( +- 0.934% )
18376 kmem:mm_page_free_direct ( +- 4.941% ) 18376 kmem:mm_page_free ( +- 4.941% )
0.643954516 seconds time elapsed ( +- 2.363% ) 0.643954516 seconds time elapsed ( +- 2.363% )
...@@ -158,15 +158,15 @@ Or you can observe the whole system's page allocations for 10 ...@@ -158,15 +158,15 @@ Or you can observe the whole system's page allocations for 10
seconds: seconds:
titan:~/git> perf stat -a -e kmem:mm_page_pcpu_drain -e titan:~/git> perf stat -a -e kmem:mm_page_pcpu_drain -e
kmem:mm_page_alloc -e kmem:mm_pagevec_free -e kmem:mm_page_alloc -e kmem:mm_page_free_batched -e
kmem:mm_page_free_direct sleep 10 kmem:mm_page_free sleep 10
Performance counter stats for 'sleep 10': Performance counter stats for 'sleep 10':
171585 kmem:mm_page_pcpu_drain 171585 kmem:mm_page_pcpu_drain
322114 kmem:mm_page_alloc 322114 kmem:mm_page_alloc
73623 kmem:mm_pagevec_free 73623 kmem:mm_page_free_batched
254115 kmem:mm_page_free_direct 254115 kmem:mm_page_free
10.000591410 seconds time elapsed 10.000591410 seconds time elapsed
...@@ -174,15 +174,15 @@ Or observe how fluctuating the page allocations are, via statistical ...@@ -174,15 +174,15 @@ Or observe how fluctuating the page allocations are, via statistical
analysis done over ten 1-second intervals: analysis done over ten 1-second intervals:
titan:~/git> perf stat --repeat 10 -a -e kmem:mm_page_pcpu_drain -e titan:~/git> perf stat --repeat 10 -a -e kmem:mm_page_pcpu_drain -e
kmem:mm_page_alloc -e kmem:mm_pagevec_free -e kmem:mm_page_alloc -e kmem:mm_page_free_batched -e
kmem:mm_page_free_direct sleep 1 kmem:mm_page_free sleep 1
Performance counter stats for 'sleep 1' (10 runs): Performance counter stats for 'sleep 1' (10 runs):
17254 kmem:mm_page_pcpu_drain ( +- 3.709% ) 17254 kmem:mm_page_pcpu_drain ( +- 3.709% )
34394 kmem:mm_page_alloc ( +- 4.617% ) 34394 kmem:mm_page_alloc ( +- 4.617% )
7509 kmem:mm_pagevec_free ( +- 4.820% ) 7509 kmem:mm_page_free_batched ( +- 4.820% )
25653 kmem:mm_page_free_direct ( +- 3.672% ) 25653 kmem:mm_page_free ( +- 3.672% )
1.058135029 seconds time elapsed ( +- 3.089% ) 1.058135029 seconds time elapsed ( +- 3.089% )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment