All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Naohiro Aota <naota@elisp.net>,
	Peter Zijlstra <peterz@infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	David Ahern <dsahern@gmail.com>,
	namhyung@kernel.org, Jiri Olsa <jolsa@redhat.com>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH perf/core 2/4] perf-probe: Fix to handle aliased symbols in glibc
Date: Mon, 2 Mar 2015 12:46:42 -0300	[thread overview]
Message-ID: <20150302154642.GD5538@kernel.org> (raw)
In-Reply-To: <20150302124953.9191.16348.stgit@localhost.localdomain>

Em Mon, Mar 02, 2015 at 09:49:53PM +0900, Masami Hiramatsu escreveu:
> With this patch;
>   -----
>   # ./perf probe -x /usr/lib64/libc-2.17.so -V malloc
>   Available variables at malloc
>           @<__libc_malloc+0>
>                   size_t  bytes
>   # ./perf probe -x /usr/lib64/libc-2.17.so -a "malloc bytes"
>   Added new event:
>     probe_libc:malloc    (on malloc in /usr/lib64/libc-2.17.so with bytes)
> 
>   You can now use it in all perf tools, such as:
> 
>           perf record -e probe_libc:malloc -aR sleep 1

> Reported-by: Arnaldo Carvalho de Melo <acme@kernel.org>

Humm, not working for me, after the patch:

[root@ssdandy ~]# perf probe -x /usr/lib64/libc-2.17.so -V malloc
Available variables at malloc
        @<__malloc_check_init+96>
                (No matched variables)
[root@ssdandy ~]#

And then the one asking for 'bytes' to be collectd fails.

After processing the other patches I'll try to debug this...

[root@ssdandy ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.0 (Maipo)
[root@ssdandy ~]# rpm -q glibc glibc-debuginfo
glibc-2.17-55.el7_0.3.x86_64
glibc-debuginfo-2.17-55.el7_0.1.x86_64
[root@ssdandy ~]#
[acme@ssdandy linux]$ readelf -Ws /usr/lib64/libc-2.17.so| grep malloc
   438: 00000000000800c0   245 FUNC    GLOBAL DEFAULT   12 __libc_malloc@@GLIBC_2.2.5
   545: 0000000000082320   239 FUNC    GLOBAL DEFAULT   12 malloc_info@@GLIBC_2.10
   810: 00000000000820c0   490 FUNC    WEAK   DEFAULT   12 malloc_stats@@GLIBC_2.2.5
   981: 00000000000802e0   507 FUNC    WEAK   DEFAULT   12 malloc_get_state@@GLIBC_2.2.5
  1077: 00000000003ba740     8 OBJECT  WEAK   DEFAULT   32 __malloc_hook@@GLIBC_2.2.5
  1170: 00000000000800c0   245 FUNC    GLOBAL DEFAULT   12 malloc@@GLIBC_2.2.5
  1204: 0000000000080d30   222 FUNC    WEAK   DEFAULT   12 malloc_usable_size@@GLIBC_2.2.5
  1450: 0000000000081d50   604 FUNC    WEAK   DEFAULT   12 malloc_trim@@GLIBC_2.2.5
  1767: 00000000003bca60     8 OBJECT  WEAK   DEFAULT   33 __malloc_initialize_hook@@GLIBC_2.2.5
  2061: 00000000000814f0  1286 FUNC    WEAK   DEFAULT   12 malloc_set_state@@GLIBC_2.2.5
    95: 00000000003bbaa0     4 OBJECT  LOCAL  DEFAULT   33 cache_malloced
  1004: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS malloc.c
  1005: 000000000007b060   275 FUNC    LOCAL  DEFAULT   12 ptmalloc_lock_all
  1011: 00000000003bcb30     8 OBJECT  LOCAL  DEFAULT   33 save_malloc_hook
  1013: 00000000000801c0   285 FUNC    LOCAL  DEFAULT   12 malloc_atfork
  1017: 000000000007b180   158 FUNC    LOCAL  DEFAULT   12 ptmalloc_unlock_all2
  1030: 000000000007ba90   174 FUNC    LOCAL  DEFAULT   12 ptmalloc_unlock_all
  1033: 000000000007bb40   232 FUNC    LOCAL  DEFAULT   12 malloc_printerr
  1057: 000000000007c3d0  1518 FUNC    LOCAL  DEFAULT   12 malloc_consolidate
  1089: 000000000007dee0  5195 FUNC    LOCAL  DEFAULT   12 _int_malloc
  1100: 000000000007f330   282 FUNC    LOCAL  DEFAULT   12 malloc_check
  1117: 00000000003bca90     4 OBJECT  LOCAL  DEFAULT   33 disallow_malloc_check
  1118: 00000000003bcaa0     4 OBJECT  LOCAL  DEFAULT   33 using_malloc_checking
  1136: 0000000000080fe0  1015 FUNC    LOCAL  DEFAULT   12 ptmalloc_init.part.8
  1138: 00000000000813e0    21 FUNC    LOCAL  DEFAULT   12 ptmalloc_init
  1139: 0000000000081400    60 FUNC    LOCAL  DEFAULT   12 malloc_hook_ini
  1160: 0000000000082fc0   495 FUNC    LOCAL  DEFAULT   12 mallochook
  1162: 00000000003bcbf0     8 OBJECT  LOCAL  DEFAULT   33 old_malloc_hook
  1181: 00000000003bcc40     8 OBJECT  LOCAL  DEFAULT   33 tr_old_malloc_hook
  1182: 0000000000083fc0   189 FUNC    LOCAL  DEFAULT   12 tr_mallochook
  1194: 00000000003bcc60     8 OBJECT  LOCAL  DEFAULT   33 malloc_trace_buffer
  3673: 00000000003ba170     4 OBJECT  LOCAL  DEFAULT   32 __libc_malloc_initialized
  3734: 00000000000814f0  1286 FUNC    LOCAL  DEFAULT   12 __malloc_set_state
  4047: 0000000000080d30   222 FUNC    LOCAL  DEFAULT   12 __malloc_usable_size
  4101: 0000000000081d50   604 FUNC    LOCAL  DEFAULT   12 __malloc_trim
  4338: 00000000000800c0   245 FUNC    LOCAL  DEFAULT   12 __GI___libc_malloc
  4531: 00000000000802e0   507 FUNC    LOCAL  DEFAULT   12 __malloc_get_state
  4569: 00000000000820c0   490 FUNC    LOCAL  DEFAULT   12 __malloc_stats
  4849: 0000000000080050   107 FUNC    LOCAL  DEFAULT   12 __malloc_check_init
  5351: 00000000000800c0   245 FUNC    LOCAL  DEFAULT   12 __malloc
  5490: 00000000003bca60     8 OBJECT  WEAK   DEFAULT   33 __malloc_initialize_hook
  5571: 00000000000814f0  1286 FUNC    WEAK   DEFAULT   12 malloc_set_state
  5868: 00000000000800c0   245 FUNC    GLOBAL DEFAULT   12 malloc
  5878: 0000000000082320   239 FUNC    GLOBAL DEFAULT   12 malloc_info
  5988: 0000000000081d50   604 FUNC    WEAK   DEFAULT   12 malloc_trim
  6526: 00000000003ba740     8 OBJECT  WEAK   DEFAULT   32 __malloc_hook
  6615: 0000000000080d30   222 FUNC    WEAK   DEFAULT   12 malloc_usable_size
  7087: 00000000000802e0   507 FUNC    WEAK   DEFAULT   12 malloc_get_state
  7104: 00000000000800c0   245 FUNC    GLOBAL DEFAULT   12 __libc_malloc
  7271: 00000000000820c0   490 FUNC    WEAK   DEFAULT   12 malloc_stats
[acme@ssdandy linux]$

- Arnaldo

  reply	other threads:[~2015-03-02 15:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-02 12:49 [PATCH perf/core 0/4] perf-probe: improve glibc support Masami Hiramatsu
2015-03-02 12:49 ` [PATCH perf/core 1/4] [RESEND][BUGFIX] perf-probe: Remove bias offset to find probe point by address Masami Hiramatsu
2015-03-03  6:26   ` [tip:perf/core] perf probe: " tip-bot for Masami Hiramatsu
2015-03-02 12:49 ` [PATCH perf/core 2/4] perf-probe: Fix to handle aliased symbols in glibc Masami Hiramatsu
2015-03-02 15:46   ` Arnaldo Carvalho de Melo [this message]
2015-03-03  2:39     ` Masami Hiramatsu
2015-03-03  2:45       ` Arnaldo Carvalho de Melo
2015-03-03  3:05         ` Arnaldo Carvalho de Melo
2015-03-03  4:11           ` Masami Hiramatsu
2015-03-03  4:24             ` Arnaldo Carvalho de Melo
2015-03-03 13:31   ` Namhyung Kim
2015-03-04  5:47     ` Masami Hiramatsu
2015-03-02 12:50 ` [PATCH perf/core 3/4] perf-probe: Fix --line " Masami Hiramatsu
2015-03-02 12:50 ` [PATCH perf/core 4/4] Revert "perf probe: Fix to fall back to find probe point in symbols" Masami Hiramatsu

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=20150302154642.GD5538@kernel.org \
    --to=acme@kernel.org \
    --cc=dsahern@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=naota@elisp.net \
    --cc=peterz@infradead.org \
    /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.