Skip to content

Commit 8a51117

Browse files
committed
Merge branch 'master' of github.com:dtrace4linux/linux
2 parents 077cf95 + 6254f0a commit 8a51117

1 file changed

Lines changed: 22 additions & 1 deletion

File tree

driver/vminfo.c

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,18 +109,30 @@ void vminfo_init(void)
109109
sdt_add_locator(vm_event_addr(PGDEACTIVATE), "vminfo:::pgdeactivate");
110110
sdt_add_locator(vm_event_addr(PGFAULT), "vminfo:::pgfault");
111111
sdt_add_locator(vm_event_addr(PGMAJFAULT), "vminfo:::pgmajfault");
112+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
113+
sdt_add_locator(vm_event_addr(PGREFILL), "vminfo:::pgrefill");
114+
#else
112115
sdt_add_locator(vm_event_addr(PGREFILL_NORMAL), "vminfo:::pgrefill");
113116
sdt_add_locator(vm_event_addr(PGREFILL_MOVABLE), "vminfo:::pgrefill");
117+
#endif
114118
# if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)
115119
sdt_add_locator(vm_event_addr(PGSTEAL_NORMAL), "vminfo:::pgsteal");
116120
sdt_add_locator(vm_event_addr(PGSTEAL_MOVABLE), "vminfo:::pgsteal");
117121
sdt_add_locator(vm_event_addr(KSWAPD_STEAL), "vminfo:::kswapd_steal");
118122
#endif
123+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
124+
sdt_add_locator(vm_event_addr(PGSCAN_KSWAPD), "vminfo:::pgscan_kswapd");
125+
#else
119126
sdt_add_locator(vm_event_addr(PGSCAN_KSWAPD_NORMAL), "vminfo:::pgscan_kswapd");
120127
sdt_add_locator(vm_event_addr(PGSCAN_KSWAPD_MOVABLE), "vminfo:::pgscan_kswapd");
128+
#endif
121129

130+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
131+
sdt_add_locator(vm_event_addr(PGSCAN_DIRECT), "vminfo:::pgscan_direct");
132+
#else
122133
sdt_add_locator(vm_event_addr(PGSCAN_DIRECT_NORMAL), "vminfo:::pgscan_direct");
123134
sdt_add_locator(vm_event_addr(PGSCAN_DIRECT_MOVABLE), "vminfo:::pgscan_direct");
135+
#endif
124136

125137
#ifdef CONFIG_NUMA
126138
sdt_add_locator(vm_event_addr(PGSCAN_ZONE_RECLAIM_FAILED), "vminfo:::pgscan_zone_reclaim_failed");
@@ -138,8 +150,13 @@ void vminfo_init(void)
138150
/*sdt_add_locator(vm_event_addr(KSWAPD_SKIP_CONGESTION_WAIT), "vminfo:::kswapd_skip_congestion_wait");*/
139151
#endif
140152
sdt_add_locator(vm_event_addr(PAGEOUTRUN), "vminfo:::pageoutrun");
141-
sdt_add_locator(vm_event_addr(ALLOCSTALL), "vminfo:::allocstall");
142153
sdt_add_locator(vm_event_addr(PGROTATED), "vminfo:::pgrotated");
154+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
155+
sdt_add_locator(vm_event_addr(ALLOCSTALL_NORMAL), "vminfo:::allocstall");
156+
sdt_add_locator(vm_event_addr(ALLOCSTALL_MOVABLE), "vminfo:::allocstall");
157+
#else
158+
sdt_add_locator(vm_event_addr(ALLOCSTALL), "vminfo:::allocstall");
159+
#endif
143160

144161
#ifdef CONFIG_COMPACTION
145162
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
@@ -173,7 +190,11 @@ void vminfo_init(void)
173190
sdt_add_locator(vm_event_addr(THP_FAULT_FALLBACK), "vminfo:::thp_fault_fallback");
174191
sdt_add_locator(vm_event_addr(THP_COLLAPSE_ALLOC), "vminfo:::thp_collapse_alloc");
175192
sdt_add_locator(vm_event_addr(THP_COLLAPSE_ALLOC_FAILED), "vminfo:::thp_collapse_alloc_failed");
193+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
194+
sdt_add_locator(vm_event_addr(THP_SPLIT_PAGE), "vminfo:::thp_split");
195+
#else
176196
sdt_add_locator(vm_event_addr(THP_SPLIT), "vminfo:::thp_split");
197+
#endif
177198
# endif
178199
dtrace_parse_kernel(PARSE_GS_INC, vminfo_instr_callback, 0);
179200
# endif /* if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38) */

0 commit comments

Comments
 (0)