Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH v3 0/1] Fix for YB6498
@ 2014-07-14 10:58 Roxana Ciobanu
  2014-07-14 10:58 ` [PATCH v3 1/1] latencytop: fix mount error Roxana Ciobanu
  0 siblings, 1 reply; 4+ messages in thread
From: Roxana Ciobanu @ 2014-07-14 10:58 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 9e99bcffec594cb5b4c3533200e8eb56d32e6a77:

  insane: Ensure do_package_qa happens after do_packagedata (2014-07-11 23:20:04 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib roxana/YB6498
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=roxana/YB6498

Roxana Ciobanu (1):
  latencytop: fix mount error

 .../latencytop-0.5/latencytop-fsync-mount.patch    | 37 ++++++++++++++++++++++
 meta/recipes-kernel/latencytop/latencytop_0.5.bb   |  3 +-
 2 files changed, 39 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync-mount.patch

-- 
1.9.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v3 1/1] latencytop: fix mount error
  2014-07-14 10:58 [PATCH v3 0/1] Fix for YB6498 Roxana Ciobanu
@ 2014-07-14 10:58 ` Roxana Ciobanu
  2014-07-14 17:49   ` Saul Wold
  0 siblings, 1 reply; 4+ messages in thread
From: Roxana Ciobanu @ 2014-07-14 10:58 UTC (permalink / raw)
  To: openembedded-core

Added a check to ensure debugfs is not mounted before trying
to mount it, because sysfs.sh already mounts it.

[ YOCTO #6498 ]

Signed-off-by: Roxana Ciobanu <roxana.ciobanu@intel.com>
---
 .../latencytop-0.5/latencytop-fsync-mount.patch    | 37 ++++++++++++++++++++++
 meta/recipes-kernel/latencytop/latencytop_0.5.bb   |  3 +-
 2 files changed, 39 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync-mount.patch

diff --git a/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync-mount.patch b/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync-mount.patch
new file mode 100644
index 0000000..9f2e120
--- /dev/null
+++ b/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync-mount.patch
@@ -0,0 +1,37 @@
+Index: latencytop-0.5/fsync.c
+===================================================================
+--- latencytop-0.5.orig/fsync.c	2014-07-14 13:25:27.657187985 +0300
++++ latencytop-0.5/fsync.c	2014-07-14 13:26:12.033187979 +0300
+@@ -32,6 +32,7 @@
+ #include <time.h>
+ #include <wchar.h>
+ #include <ctype.h>
++#include <sys/stat.h>
+ 
+ #include <glib.h>
+ 
+@@ -142,16 +143,23 @@
+ int enable_fsync_tracer(void)
+ {
+ 	int ret;
++    struct stat s_debug, s_mount_point;
++
+ /*
+  * Steps to do:
+  *
++ * check if /sys/kernel/debug is mounted
+  * mount -t debugfs none /sys/kernel/debug/
+  * cd /sys/kernel/debug/tracing
+  * echo fsync > current_tracer
+  * echo ftrace_printk > iter_ctrl 
+  * echo 1 > tracing_on
+  */
+-	ret = system("/bin/mount -t debugfs none /sys/kernel/debug/");
++
++    stat("/sys/kernel/debug/..", &s_debug);
++    if (stat("/sys/kernel/debug", &s_mount_point) != 0 ||
++        (s_debug.st_dev == s_mount_point.st_dev))
++        ret = system("/bin/mount -t debugfs none /sys/kernel/debug/");
+ 	if (!ret) 
+ 		return -1;
+ 	write_to_file("/sys/kernel/debug/tracing/current_tracer", "fsync");	
diff --git a/meta/recipes-kernel/latencytop/latencytop_0.5.bb b/meta/recipes-kernel/latencytop/latencytop_0.5.bb
index 516e2c5..243f3d9 100644
--- a/meta/recipes-kernel/latencytop/latencytop_0.5.bb
+++ b/meta/recipes-kernel/latencytop/latencytop_0.5.bb
@@ -10,7 +10,8 @@ PR = "r3"
 
 SRC_URI = "http://www.latencytop.org/download/latencytop-${PV}.tar.gz \
             file://latencytop-makefile.patch \
-            file://latencytop-fsync.patch"
+            file://latencytop-fsync.patch \
+            file://latencytop-fsync-mount.patch"
 
 SRC_URI[md5sum] = "73bb3371c6ee0b0e68e25289027e865c"
 SRC_URI[sha256sum] = "9e7f72fbea7bd918e71212a1eabaad8488d2c602205d2e3c95d62cd57e9203ef"
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v3 1/1] latencytop: fix mount error
  2014-07-14 10:58 ` [PATCH v3 1/1] latencytop: fix mount error Roxana Ciobanu
@ 2014-07-14 17:49   ` Saul Wold
  2014-07-14 18:56     ` Burton, Ross
  0 siblings, 1 reply; 4+ messages in thread
From: Saul Wold @ 2014-07-14 17:49 UTC (permalink / raw)
  To: Roxana Ciobanu, openembedded-core

On 07/14/2014 03:58 AM, Roxana Ciobanu wrote:
> Added a check to ensure debugfs is not mounted before trying
> to mount it, because sysfs.sh already mounts it.
>
> [ YOCTO #6498 ]
>
> Signed-off-by: Roxana Ciobanu <roxana.ciobanu@intel.com>
> ---
>   .../latencytop-0.5/latencytop-fsync-mount.patch    | 37 ++++++++++++++++++++++
>   meta/recipes-kernel/latencytop/latencytop_0.5.bb   |  3 +-
>   2 files changed, 39 insertions(+), 1 deletion(-)
>   create mode 100644 meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync-mount.patch
>
> diff --git a/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync-mount.patch b/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync-mount.patch
> new file mode 100644
> index 0000000..9f2e120
> --- /dev/null
> +++ b/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync-mount.patch

This patch file needs Signed-off-by and Upstream-Status tags.  Also have 
you submitted this change to the upstream community?

Sau!

> @@ -0,0 +1,37 @@
> +Index: latencytop-0.5/fsync.c
> +===================================================================
> +--- latencytop-0.5.orig/fsync.c	2014-07-14 13:25:27.657187985 +0300
> ++++ latencytop-0.5/fsync.c	2014-07-14 13:26:12.033187979 +0300
> +@@ -32,6 +32,7 @@
> + #include <time.h>
> + #include <wchar.h>
> + #include <ctype.h>
> ++#include <sys/stat.h>
> +
> + #include <glib.h>
> +
> +@@ -142,16 +143,23 @@
> + int enable_fsync_tracer(void)
> + {
> + 	int ret;
> ++    struct stat s_debug, s_mount_point;
> ++
> + /*
> +  * Steps to do:
> +  *
> ++ * check if /sys/kernel/debug is mounted
> +  * mount -t debugfs none /sys/kernel/debug/
> +  * cd /sys/kernel/debug/tracing
> +  * echo fsync > current_tracer
> +  * echo ftrace_printk > iter_ctrl
> +  * echo 1 > tracing_on
> +  */
> +-	ret = system("/bin/mount -t debugfs none /sys/kernel/debug/");
> ++
> ++    stat("/sys/kernel/debug/..", &s_debug);
> ++    if (stat("/sys/kernel/debug", &s_mount_point) != 0 ||
Why do two stats here?  Can't you stat an entry inside of the 
/sys/kernel/debug directory?

Sau!
> ++        (s_debug.st_dev == s_mount_point.st_dev))
> ++        ret = system("/bin/mount -t debugfs none /sys/kernel/debug/");
> + 	if (!ret)
> + 		return -1;
> + 	write_to_file("/sys/kernel/debug/tracing/current_tracer", "fsync");	
> diff --git a/meta/recipes-kernel/latencytop/latencytop_0.5.bb b/meta/recipes-kernel/latencytop/latencytop_0.5.bb
> index 516e2c5..243f3d9 100644
> --- a/meta/recipes-kernel/latencytop/latencytop_0.5.bb
> +++ b/meta/recipes-kernel/latencytop/latencytop_0.5.bb
> @@ -10,7 +10,8 @@ PR = "r3"
>
>   SRC_URI = "http://www.latencytop.org/download/latencytop-${PV}.tar.gz \
>               file://latencytop-makefile.patch \
> -            file://latencytop-fsync.patch"
> +            file://latencytop-fsync.patch \
> +            file://latencytop-fsync-mount.patch"
>
>   SRC_URI[md5sum] = "73bb3371c6ee0b0e68e25289027e865c"
>   SRC_URI[sha256sum] = "9e7f72fbea7bd918e71212a1eabaad8488d2c602205d2e3c95d62cd57e9203ef"
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3 1/1] latencytop: fix mount error
  2014-07-14 17:49   ` Saul Wold
@ 2014-07-14 18:56     ` Burton, Ross
  0 siblings, 0 replies; 4+ messages in thread
From: Burton, Ross @ 2014-07-14 18:56 UTC (permalink / raw)
  To: Saul Wold; +Cc: OE-core

On 14 July 2014 18:49, Saul Wold <sgw@linux.intel.com> wrote:
> Why do two stats here?  Can't you stat an entry inside of the
> /sys/kernel/debug directory?

It's the idiomatic "is this a mount point" test: look at the device
number inside and outside the hopeful mount point, and if they're
different then there's a mount.  You need to stat twice to determine
this.

Ross


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-07-14 18:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-14 10:58 [PATCH v3 0/1] Fix for YB6498 Roxana Ciobanu
2014-07-14 10:58 ` [PATCH v3 1/1] latencytop: fix mount error Roxana Ciobanu
2014-07-14 17:49   ` Saul Wold
2014-07-14 18:56     ` Burton, Ross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox