Module: xenomai-forge
Branch: next
Commit: 593ae92bd2291dbb1586e26d9ffb308bc17d03fb
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=593ae92bd2291dbb1586e26d9ffb308bc17d03fb

Author: Philippe Gerum <r...@xenomai.org>
Date:   Fri Aug  8 14:41:35 2014 +0200

utils/autotune: give visual feedback while auto-tuning

---

 utils/autotune/autotune.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/utils/autotune/autotune.c b/utils/autotune/autotune.c
index 2a9d814..2ca10d5 100644
--- a/utils/autotune/autotune.c
+++ b/utils/autotune/autotune.c
@@ -192,6 +192,11 @@ static void run_tuner(int fd, int op, int period, const 
char *type)
        pthread_t sampler;
        int ret;
 
+       if (!quiet) {
+               printf("%s gravity... ", type);
+               fflush(stdout);
+       }
+
        ret = ioctl(fd, op, &period);
        if (ret)
                error(1, errno, "setup failed (%s)", type);
@@ -207,7 +212,7 @@ static void run_tuner(int fd, int op, int period, const 
char *type)
                pthread_cancel(sampler);
 
        if (!quiet)
-               printf("%s gravity = %lu ns\n", type, gravity);
+               printf("%lu ns\n", gravity);
 }
 
 int main(int argc, char *const argv[])
@@ -262,6 +267,9 @@ int main(int argc, char *const argv[])
 
        period = CONFIG_XENO_DEFAULT_PERIOD;
 
+       if (tune_irqlat || tune_kernlat || tune_userlat)
+               printf("Auto-tuning started (may take some time)\n");
+
        if (tune_irqlat)
                run_tuner(fd, AUTOTUNE_RTIOC_IRQ, period, "irq");
 


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to