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]
Message-ID: <677243ef-4ddf-6d65-8a95-45da915d4e5d@gmail.com>
Date:   Thu, 2 Mar 2017 00:52:48 +0900
From:   Taeung Song <treeze.taeung@...il.com>
To:     Peter Zijlstra <peterz@...radead.org>,
        Namhyung Kim <namhyung@...nel.org>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        linux-kernel@...r.kernel.org, Jiri Olsa <jolsa@...nel.org>,
        Ingo Molnar <mingo@...nel.org>, Wang Nan <wangnan0@...wei.com>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Jiri Olsa <jolsa@...hat.com>, kernel-team@....com
Subject: Re: [PATCH v2 2/3] perf annotate: Introduce the new source code view

Hi, Peter

On 03/02/2017 12:07 AM, Peter Zijlstra wrote:
> On Wed, Mar 01, 2017 at 11:56:39PM +0900, Namhyung Kim wrote:
>
>> It's a kind of user experience issue.  We provide the asm-only and
>> asm+source annotation, and I think it'd be nice to add source-only
>> option.  And I remember that it was requested some time ago..
>
> Thing is, an optimizing compiler -- that same beast that ensures your
> objdump -S output is such a garbled mess -- can generate code that
> becomes very hard to relate to the original source code.
>
> I'm really sceptical the source line only view is very useful; maybe if
> you build with -O0, but then, if you do that you're not bothered with
> performance.
>

I think there is a fundamental difference between the two points of view.

   1) Based on assembly code view, we can show parts of actual source code.
   2) Based on source code view, we can show parts of assembly code for 
a particular source code line.

I think current compilers have some limitations about the optimization.
what they can't optimize is the logic or process.
So, many developers should optimize the logic or process.
And to do that, I think we need to the source code view with overhead.

And I think we can show asm lines for a particular in the source view,
when the user press ENTER key at a source code line.

For example,
If a current line is line 47 and
the user press ENTER key, we can show asm per the source code line.

            │46   void pack_knapsack(struct jewelry *jewelry)
            │47   {
            │      push   %rbp
            │      mov    %rsp,%rbp
            │      sub    $0x18,%rsp
            │      mov    %rdi,-0x18(%rbp)
            │48      /* Case by case pack knapsack following maximum
...

And I think we don't need to only show actual source code.
But we can show assembly code based on source code view.

Thanks,
Taeung

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ