lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 25 Jul 2018 23:39:09 +0900
From:   Masahiro Yamada <yamada.masahiro@...ionext.com>
To:     Jeremy Cline <jcline@...hat.com>
Cc:     Michal Marek <michal.lkml@...kovi.net>,
        Frederic Weisbecker <fweisbec@...il.com>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] scripts: Add Python 3 support to tracing/draw_functrace.py

2018-07-21 4:35 GMT+09:00 Jeremy Cline <jcline@...hat.com>:
> Use the print function. This maintains Python 2 support and should have
> no functional change.
>
> Signed-off-by: Jeremy Cline <jcline@...hat.com>
> ---
>  scripts/tracing/draw_functrace.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/tracing/draw_functrace.py b/scripts/tracing/draw_functrace.py
> index db40fa04cd51..7d44e796d362 100755
> --- a/scripts/tracing/draw_functrace.py
> +++ b/scripts/tracing/draw_functrace.py
> @@ -20,6 +20,7 @@ Usage:
>         $ scripts/draw_functrace.py < raw_trace_func > draw_functrace
>         Then you have your drawn trace in draw_functrace
>  """
> +from __future__ import print_function

What do you need this line for?

I have not tested this,
but I guess print(CallTree.ROOT) will work for Python 2.



>
>  import sys, re
> @@ -123,7 +124,7 @@ def main():
>                 tree = tree.getParent(caller)
>                 tree = tree.calls(callee, calltime)
>
> -       print CallTree.ROOT
> +       print(CallTree.ROOT)
>
>  if __name__ == "__main__":
>         main()
> --
> 2.17.1
>



-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ