[API-NEXT] helper: remove debug on thread start

Message ID 1482761404-22120-1-git-send-email-maxim.uvarov@linaro.org
State New
Headers show

Commit Message

Maxim Uvarov Dec. 26, 2016, 2:10 p.m.
Message floods tests output. There is no reason for prints
of starting threads due to each application if needed can
do there own prints.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

---
 helper/linux.c | 7 -------
 1 file changed, 7 deletions(-)

-- 
2.7.1.250.gff4ea60

Comments

Bill Fischofer Dec. 26, 2016, 3:17 p.m. | #1
On Mon, Dec 26, 2016 at 8:10 AM, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:
> Message floods tests output. There is no reason for prints

> of starting threads due to each application if needed can

> do there own prints.

>

> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

> ---

>  helper/linux.c | 7 -------

>  1 file changed, 7 deletions(-)

>

> diff --git a/helper/linux.c b/helper/linux.c

> index 7bd0b07..38646e9 100644

> --- a/helper/linux.c

> +++ b/helper/linux.c

> @@ -265,13 +265,6 @@ static void *odpthread_run_start_routine(void *arg)

>                 return (void *)-1;

>         }

>

> -       ODPH_DBG("helper: ODP %s thread started as linux %s. (pid=%d)\n",

> -                thr_params->thr_type == ODP_THREAD_WORKER ?

> -                "worker" : "control",

> -                (start_args->linuxtype == ODPTHREAD_PTHREAD) ?

> -                "pthread" : "process",

> -                (int)getpid());


It looks like the bigger issue here is that these produce
unconditional output. If you look at the corresponding ODP_DBG()
macro, which this is clearly intended to be modeled after, that only
produces output when built with ./configure --enable-debug-print

Sounds like helpers really should follow the same model and make these
outputs conditional based on a compile flag.


> -

>         status = thr_params->start(thr_params->arg);

>         ret = odp_term_local();

>

> --

> 2.7.1.250.gff4ea60

>

Patch

diff --git a/helper/linux.c b/helper/linux.c
index 7bd0b07..38646e9 100644
--- a/helper/linux.c
+++ b/helper/linux.c
@@ -265,13 +265,6 @@  static void *odpthread_run_start_routine(void *arg)
 		return (void *)-1;
 	}
 
-	ODPH_DBG("helper: ODP %s thread started as linux %s. (pid=%d)\n",
-		 thr_params->thr_type == ODP_THREAD_WORKER ?
-		 "worker" : "control",
-		 (start_args->linuxtype == ODPTHREAD_PTHREAD) ?
-		 "pthread" : "process",
-		 (int)getpid());
-
 	status = thr_params->start(thr_params->arg);
 	ret = odp_term_local();