Skip to contentSkip to conversation

Fix: Add gfpflags.h wrapper for kernel >= 4.6.0

PATCH Mathieu Desnoyers 2 participants 3 messages Apr 5, 2016 3 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 8 lines · ----- On Apr 5, 2016, at 3:07 PM, Michael Jeanson [email protected] wrote:

The gfpflags.h header file was renamed to mmflags.h in the 4.6.0 release, see the upstream commit:

commit 420adbe9fc1a45187cfa74df9dbfd72272c4e2fa
Author: Vlastimil Babka <[email protected]>
Date: Tue Mar 15 14:55:52 2016 -0700

mm, tracing: unify mm flags handling in tracepoints and printk

See upstream branches: I have removed those includes because this header's content was unused.

Thanks,

Mathieu

Quoted 77 lines

---

instrumentation/events/lttng-module/btrfs.h      |  2 +-
instrumentation/events/lttng-module/compaction.h |  2 +-
wrapper/gfpflags.h                               | 32 ++++++++++++++++++++++++
3 files changed, 34 insertions(+), 2 deletions(-)

create mode 100644 wrapper/gfpflags.h

instrumentation/events/lttng-module/btrfs.h +1 -1
index 2f67d5f..2088431 100644
@@ -6,7 +6,7 @@
 
 #include <probes/lttng-tracepoint-event.h>
 #include <linux/writeback.h>
-#include <trace/events/gfpflags.h>
+#include <wrapper/gfpflags.h>
 #include <linux/version.h>
 
 #ifndef _TRACE_BTRFS_DEF_
instrumentation/events/lttng-module/compaction.h +1 -1
index 64579fe..7b4348c 100644
@@ -7,7 +7,7 @@
 #include <probes/lttng-tracepoint-event.h>
 #include <linux/types.h>
 #include <linux/version.h>
-#include <trace/events/gfpflags.h>
+#include <wrapper/gfpflags.h>
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
 
wrapper/gfpflags.h new file +32 -1
new file mode 100644
index 0000000..26e78e6
@@ -0,0 +1,32 @@
+#ifndef _LTTNG_WRAPPER_GFPFLAGS_H
+#define _LTTNG_WRAPPER_GFPFLAGS_H
+
+/*
+ * wrapper/gfpflags.h
+ *
+ * wrapper around trace/events/gfpflags.h.
+ *
+ * Copyright (C) 2016 Michael Jeanson <[email protected]>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0))
+#include <trace/events/mmflags.h>
+#else
+#include <trace/events/gfpflags.h>
+#endif
+
+#endif /* _LTTNG_WRAPPER_GFPFLAGS_H */
--

2.7.4

Signature · 7 lines
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

With current lttng-modules master (abfd272b984fd9881984e44d04979e3a093e8a39) I still get this:

CC [M] /home/mjeanson/Git/lttng/lttng-modules/probes/lttng-probe-printk.o
In file included from /home/mjeanson/Git/lttng/lttng-modules/probes/lttng-probe-compaction.c:40:0:
/home/mjeanson/Git/lttng/lttng-modules/probes/../instrumentation/events/lttng-module/compaction.h:10:35: fatal error: trace/events/gfpflags.h: No such file or directory compilation terminated.
scripts/Makefile.build:297: recipe for target '/home/mjeanson/Git/lttng/lttng-modules/probes/lttng-probe-compaction.o' failed
make[3]: *** [/home/mjeanson/Git/lttng/lttng-modules/probes/lttng-probe-compaction.o] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from /home/mjeanson/Git/lttng/lttng-modules/probes/lttng-probe-btrfs.c:45:0:
/home/mjeanson/Git/lttng/lttng-modules/probes/../instrumentation/events/lttng-module/btrfs.h:9:35: fatal error: trace/events/gfpflags.h: No such file or directory compilation terminated.

Quoted 92 lines · ----- On Apr 5, 2016, at 3:13 PM, Mathieu Desnoyers…
Quoted 8 lines · ----- On Apr 5, 2016, at 3:07 PM, Michael Jeanson [email protected] wrote:

The gfpflags.h header file was renamed to mmflags.h in the 4.6.0 release, see the upstream commit:

commit 420adbe9fc1a45187cfa74df9dbfd72272c4e2fa
Author: Vlastimil Babka <[email protected]>
Date: Tue Mar 15 14:55:52 2016 -0700

mm, tracing: unify mm flags handling in tracepoints and printk

See upstream branches: I have removed those includes because this header's content was unused.

Thanks,

Mathieu

Quoted 74 lines

---

instrumentation/events/lttng-module/btrfs.h      |  2 +-
instrumentation/events/lttng-module/compaction.h |  2 +-
wrapper/gfpflags.h                               | 32 ++++++++++++++++++++++++
3 files changed, 34 insertions(+), 2 deletions(-)

create mode 100644 wrapper/gfpflags.h

instrumentation/events/lttng-module/btrfs.h +1 -1
index 2f67d5f..2088431 100644
@@ -6,7 +6,7 @@
 
 #include <probes/lttng-tracepoint-event.h>
 #include <linux/writeback.h>
-#include <trace/events/gfpflags.h>
+#include <wrapper/gfpflags.h>
 #include <linux/version.h>
 
 #ifndef _TRACE_BTRFS_DEF_
instrumentation/events/lttng-module/compaction.h +1 -1
index 64579fe..7b4348c 100644
@@ -7,7 +7,7 @@
 #include <probes/lttng-tracepoint-event.h>
 #include <linux/types.h>
 #include <linux/version.h>
-#include <trace/events/gfpflags.h>
+#include <wrapper/gfpflags.h>
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
 
wrapper/gfpflags.h new file +31 -0
new file mode 100644
index 0000000..26e78e6
@@ -0,0 +1,32 @@
+#ifndef _LTTNG_WRAPPER_GFPFLAGS_H
+#define _LTTNG_WRAPPER_GFPFLAGS_H
+
+/*
+ * wrapper/gfpflags.h
+ *
+ * wrapper around trace/events/gfpflags.h.
+ *
+ * Copyright (C) 2016 Michael Jeanson <[email protected]>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0))
+#include <trace/events/mmflags.h>
+#else
+#include <trace/events/gfpflags.h>
+#endif
+
Quoted 8 lines
Quoted 3 lines
wrapper/gfpflags.h new file +1 -1
+#endif /* _LTTNG_WRAPPER_GFPFLAGS_H */
--

2.7.4

--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw
Quoted 13 lines · ----- On Apr 5, 2016, at 3:23 PM, Michael Jeanson [email protected] wrote:

With current lttng-modules master (abfd272b984fd9881984e44d04979e3a093e8a39) I still
get this:

CC [M] /home/mjeanson/Git/lttng/lttng-modules/probes/lttng-probe-printk.o
In file included from /home/mjeanson/Git/lttng/lttng-modules/probes/lttng-probe-compaction.c:40:0:
/home/mjeanson/Git/lttng/lttng-modules/probes/../instrumentation/events/lttng-module/compaction.h:10:35:
fatal error: trace/events/gfpflags.h: No such file or directory
compilation terminated.
scripts/Makefile.build:297: recipe for target '/home/mjeanson/Git/lttng/lttng-modules/probes/lttng-probe-compaction.o' failed make[3]: ***

Quoted 8 lines

[/home/mjeanson/Git/lttng/lttng-modules/probes/lttng-probe-compaction.o] Error
1
make[3]: *** Waiting for unfinished jobs....
In file included from /home/mjeanson/Git/lttng/lttng-modules/probes/lttng-probe-btrfs.c:45:0:
/home/mjeanson/Git/lttng/lttng-modules/probes/../instrumentation/events/lttng-module/btrfs.h:9:35:
fatal error: trace/events/gfpflags.h: No such file or directory
compilation terminated.

Good point, fixed, and pushed, thanks!

Mathieu

Quoted 105 lines

----- On Apr 5, 2016, at 3:13 PM, Mathieu Desnoyers

Quoted 100 lines · [email protected] wrote:
Quoted 8 lines · ----- On Apr 5, 2016, at 3:07 PM, Michael Jeanson [email protected] wrote:

The gfpflags.h header file was renamed to mmflags.h in the 4.6.0 release, see the upstream commit:

commit 420adbe9fc1a45187cfa74df9dbfd72272c4e2fa
Author: Vlastimil Babka <[email protected]>
Date: Tue Mar 15 14:55:52 2016 -0700

mm, tracing: unify mm flags handling in tracepoints and printk

See upstream branches: I have removed those includes because this header's content was unused.

Thanks,

Mathieu

Quoted 76 lines

---

instrumentation/events/lttng-module/btrfs.h      |  2 +-
instrumentation/events/lttng-module/compaction.h |  2 +-
wrapper/gfpflags.h                               | 32 ++++++++++++++++++++++++
3 files changed, 34 insertions(+), 2 deletions(-)

create mode 100644 wrapper/gfpflags.h

instrumentation/events/lttng-module/btrfs.h +1 -1
index 2f67d5f..2088431 100644
@@ -6,7 +6,7 @@
 
 #include <probes/lttng-tracepoint-event.h>
 #include <linux/writeback.h>
-#include <trace/events/gfpflags.h>
+#include <wrapper/gfpflags.h>
 #include <linux/version.h>
 
 #ifndef _TRACE_BTRFS_DEF_
instrumentation/events/lttng-module/compaction.h +1 -1
index 64579fe..7b4348c 100644
@@ -7,7 +7,7 @@
 #include <probes/lttng-tracepoint-event.h>
 #include <linux/types.h>
 #include <linux/version.h>
-#include <trace/events/gfpflags.h>
+#include <wrapper/gfpflags.h>
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
 
wrapper/gfpflags.h new file +32 -1
new file mode 100644
index 0000000..26e78e6
@@ -0,0 +1,32 @@
+#ifndef _LTTNG_WRAPPER_GFPFLAGS_H
+#define _LTTNG_WRAPPER_GFPFLAGS_H
+
+/*
+ * wrapper/gfpflags.h
+ *
+ * wrapper around trace/events/gfpflags.h.
+ *
+ * Copyright (C) 2016 Michael Jeanson <[email protected]>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0))
+#include <trace/events/mmflags.h>
+#else
+#include <trace/events/gfpflags.h>
+#endif
+
+#endif /* _LTTNG_WRAPPER_GFPFLAGS_H */
--
Quoted 1 line

2.7.4

--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

Signature · 7 lines
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev