oprofile: upstep 0.9.7 patches to 0.9.8
authorThomas De Schampheleire <patrickdepinguin+buildroot@gmail.com>
Tue, 12 Mar 2013 18:10:55 +0000 (19:10 +0100)
committerPeter Korsgaard <jacmet@sunsite.dk>
Mon, 18 Mar 2013 21:19:51 +0000 (22:19 +0100)
The patches to oprofile 0.9.7 seem still relevant for 0.9.8, but for some
reason they were not upstepped.

[Peter: drop version number from patch filenames]
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/oprofile/oprofile-0.9.7-001-avr32-enable-lookup_dcookie.patch [deleted file]
package/oprofile/oprofile-0.9.7-002-no-query-modules.patch [deleted file]
package/oprofile/oprofile-001-avr32-enable-lookup_dcookie.patch [new file with mode: 0644]
package/oprofile/oprofile-002-no-query-modules.patch [new file with mode: 0644]

diff --git a/package/oprofile/oprofile-0.9.7-001-avr32-enable-lookup_dcookie.patch b/package/oprofile/oprofile-0.9.7-001-avr32-enable-lookup_dcookie.patch
deleted file mode 100644 (file)
index 7c41389..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-Index: oprofile-0.9.4/daemon/opd_cookie.c
-===================================================================
---- oprofile-0.9.4.orig/daemon/opd_cookie.c    2008-07-25 16:00:17.000000000 +0200
-+++ oprofile-0.9.4/daemon/opd_cookie.c 2008-07-25 16:00:20.000000000 +0200
-@@ -78,6 +78,19 @@
-                      (unsigned long)(cookie & 0xffffffff),
-                      (unsigned long)(cookie >> 32), buf, size);
- }
-+#elif (defined(__avr32__))
-+static inline int lookup_dcookie(cookie_t cookie, char * buf, size_t size)
-+{
-+      /* On avr32, the first 64bit arg (cookie) is expected to be in
-+       * r11(MSW)/r10(LSW) which normally hold arg 2 and arg 3. The second arg
-+       * (buf) is then expected to be in r12 which normally holds the first
-+       * arg. Third arg (size) is at the right position.
-+       */
-+      return syscall(__NR_lookup_dcookie, buf,
-+                      (unsigned long)(cookie >> 32),
-+                      (unsigned long)(cookie & 0xffffffff),
-+                      size);
-+}
- #else
- static inline int lookup_dcookie(cookie_t cookie, char * buf, size_t size)
- {
diff --git a/package/oprofile/oprofile-0.9.7-002-no-query-modules.patch b/package/oprofile/oprofile-0.9.7-002-no-query-modules.patch
deleted file mode 100644 (file)
index 9f00da6..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -urN oprofile-0.9.4-0rig//daemon/liblegacy/opd_kernel.c oprofile-0.9.4/daemon/liblegacy/opd_kernel.c
---- oprofile-0.9.4-0rig//daemon/liblegacy/opd_kernel.c 2005-05-04 04:47:03.000000000 +0200
-+++ oprofile-0.9.4/daemon/liblegacy/opd_kernel.c       2009-01-21 07:40:20.000000000 +0100
-@@ -270,6 +270,9 @@
-  */
- static void opd_drop_module_sample(unsigned long eip)
- {
-+      verbprintf(vmodule, "query_module not available on linux-2.6: %s\n", strerror(EPERM));
-+
-+#if   0
-       char * module_names;
-       char * name;
-       size_t size = 1024;
-@@ -307,6 +310,7 @@
-       if (module_names)
-               free(module_names);
-+#endif
- }
diff --git a/package/oprofile/oprofile-001-avr32-enable-lookup_dcookie.patch b/package/oprofile/oprofile-001-avr32-enable-lookup_dcookie.patch
new file mode 100644 (file)
index 0000000..7c41389
--- /dev/null
@@ -0,0 +1,24 @@
+Index: oprofile-0.9.4/daemon/opd_cookie.c
+===================================================================
+--- oprofile-0.9.4.orig/daemon/opd_cookie.c    2008-07-25 16:00:17.000000000 +0200
++++ oprofile-0.9.4/daemon/opd_cookie.c 2008-07-25 16:00:20.000000000 +0200
+@@ -78,6 +78,19 @@
+                      (unsigned long)(cookie & 0xffffffff),
+                      (unsigned long)(cookie >> 32), buf, size);
+ }
++#elif (defined(__avr32__))
++static inline int lookup_dcookie(cookie_t cookie, char * buf, size_t size)
++{
++      /* On avr32, the first 64bit arg (cookie) is expected to be in
++       * r11(MSW)/r10(LSW) which normally hold arg 2 and arg 3. The second arg
++       * (buf) is then expected to be in r12 which normally holds the first
++       * arg. Third arg (size) is at the right position.
++       */
++      return syscall(__NR_lookup_dcookie, buf,
++                      (unsigned long)(cookie >> 32),
++                      (unsigned long)(cookie & 0xffffffff),
++                      size);
++}
+ #else
+ static inline int lookup_dcookie(cookie_t cookie, char * buf, size_t size)
+ {
diff --git a/package/oprofile/oprofile-002-no-query-modules.patch b/package/oprofile/oprofile-002-no-query-modules.patch
new file mode 100644 (file)
index 0000000..9f00da6
--- /dev/null
@@ -0,0 +1,21 @@
+diff -urN oprofile-0.9.4-0rig//daemon/liblegacy/opd_kernel.c oprofile-0.9.4/daemon/liblegacy/opd_kernel.c
+--- oprofile-0.9.4-0rig//daemon/liblegacy/opd_kernel.c 2005-05-04 04:47:03.000000000 +0200
++++ oprofile-0.9.4/daemon/liblegacy/opd_kernel.c       2009-01-21 07:40:20.000000000 +0100
+@@ -270,6 +270,9 @@
+  */
+ static void opd_drop_module_sample(unsigned long eip)
+ {
++      verbprintf(vmodule, "query_module not available on linux-2.6: %s\n", strerror(EPERM));
++
++#if   0
+       char * module_names;
+       char * name;
+       size_t size = 1024;
+@@ -307,6 +310,7 @@
+       if (module_names)
+               free(module_names);
++#endif
+ }