All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
To: Anton Blanchard <anton@samba.org>, Michael Ellerman <mpe@ellerman.id.au>
Cc: Andrew Donnellan <andrew.donnellan@au1.ibm.com>,
	chris@distroguy.com, aneesh.kumar@linux.vnet.ibm.com,
	ast@kernel.org, linux-kernel@vger.kernel.org, oss@buserror.net,
	paul.gortmaker@windriver.com, duwe@lst.de,
	lsorense@csclub.uwaterloo.ca, bauerman@linux.vnet.ibm.com,
	oohall@gmail.com, naveen.n.rao@linux.vnet.ibm.com,
	linuxppc-dev@lists.ozlabs.org, paulus@samba.org,
	viro@zeniv.linux.org.uk,
	Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Subject: Re: [PATCH 1/3] powerpc: Emulation support for load/store instructions on LE
Date: Mon, 7 Nov 2016 00:29:04 +0530	[thread overview]
Message-ID: <581F7D78.1040008@linux.vnet.ibm.com> (raw)
In-Reply-To: <20161106063151.3ef04e9e@kryten>



On Sunday 06 November 2016 01:01 AM, Anton Blanchard wrote:
> Hi,
>
>> kprobe, uprobe, hw-breakpoint and xmon are the only user of
>> emulate_step.
>>
>> Kprobe / uprobe single-steps instruction if they can't emulate it, so
>> there is no problem with them. As I mention, hw-breakpoint is broken.
>> However I'm not sure about xmon, I need to check that.
> I was mostly concerned that it would impact kprobes. Sounds like we are
> ok there.
>
>> So yes, there is no user-visible feature that depends on this.
> Aren't hardware breakpoints exposed via perf? I'd call perf
> user-visible.


Thanks Anton, That's a good catch. I tried this on ppc64le:

  $ sudo cat /proc/kallsyms  | grep pid_max
    c00000000116998c D pid_max

  $ sudo ./perf record -a --event=mem:0xc00000000116998c sleep 10


Before patch:
  It does not record any data and throws below warning.

  $ dmesg
    [  817.895573] Unable to handle hardware breakpoint. Breakpoint at 0xc00000000116998c will be disabled.
    [  817.895581] ------------[ cut here ]------------
    [  817.895588] WARNING: CPU: 24 PID: 2032 at arch/powerpc/kernel/hw_breakpoint.c:277 hw_breakpoint_handler+0x124/0x230
    ...

After patch:
  It records data properly.

  $ sudo ./perf report --stdio
    ...
    # Samples: 36  of event 'mem:0xc00000000116998c'
    # Event count (approx.): 36
    #
    # Overhead  Command        Shared Object     Symbol      
    # ........  .............  ................  .............
    #
        63.89%  kdumpctl       [kernel.vmlinux]  [k] alloc_pid
        27.78%  opal_errd      [kernel.vmlinux]  [k] alloc_pid
         5.56%  kworker/u97:4  [kernel.vmlinux]  [k] alloc_pid
         2.78%  systemd        [kernel.vmlinux]  [k] alloc_pid


-Ravi

  reply	other threads:[~2016-11-06 18:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-02  8:53 [PATCH 0/3] powerpc: Emulation support for load/store instructions on LE Ravi Bangoria
2016-11-02  8:53 ` [PATCH 1/3] " Ravi Bangoria
2016-11-02 21:04   ` Anton Blanchard
2016-11-03  5:41     ` Ravi Bangoria
2016-11-03  9:48       ` Michael Ellerman
2016-11-03 10:27         ` Ravi Bangoria
2016-11-04  2:07           ` Andrew Donnellan
2016-11-04  5:31             ` Ravi Bangoria
2016-11-05 19:31               ` Anton Blanchard
2016-11-06 18:59                 ` Ravi Bangoria [this message]
2016-11-02  8:53 ` [PATCH 2/3] powerpc: Add encoding for couple of load/store instructions Ravi Bangoria
2016-11-02  8:53 ` [PATCH 3/3] powerpc: emulate_step test for " Ravi Bangoria
2016-11-02 10:30   ` Naveen N. Rao
2016-11-03  7:03 ` [PATCH 0/3] powerpc: Emulation support for load/store instructions on LE Naveen N. Rao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=581F7D78.1040008@linux.vnet.ibm.com \
    --to=ravi.bangoria@linux.vnet.ibm.com \
    --cc=andrew.donnellan@au1.ibm.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=anton@samba.org \
    --cc=ast@kernel.org \
    --cc=bauerman@linux.vnet.ibm.com \
    --cc=chris@distroguy.com \
    --cc=duwe@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=lsorense@csclub.uwaterloo.ca \
    --cc=mpe@ellerman.id.au \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=oohall@gmail.com \
    --cc=oss@buserror.net \
    --cc=paul.gortmaker@windriver.com \
    --cc=paulus@samba.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.