Re: [PATCH 7/7] perf script: mark inlined frames and do not print DSO for them

2017-05-24 Thread Milian Wolff
On Monday, May 22, 2017 2:11:58 PM CEST Namhyung Kim wrote:
> On Thu, May 18, 2017 at 09:34:11PM +0200, Milian Wolff wrote:
> > Instead of showing the (repeated) DSO name of the non-inlined
> > frame, we now show the "(inlined)" suffix instead.
> > 
> > Before:
> >214f7 __hypot_finite (/usr/lib/libm-2.25.so)
> >
> > ace3 hypot (/usr/lib/libm-2.25.so)
> > 
> >  std::__complex_abs
> >  (/home/milian/projects/src/perf-tests/inlining)
> >  std::abs
> >  (/home/milian/projects/src/perf-tests/inlining)
> >  std::_Norm_helper::_S_do_it
> >  (/home/milian/projects/src/perf-tests/inlining)
> >  std::norm
> >  (/home/milian/projects/src/perf-tests/inlining)
> >  
> >  a4a main
> >  (/home/milian/projects/src/perf-tests/inlining)
> >
> >20510 __libc_start_main (/usr/lib/libc-2.25.so)
> >
> >  bd9 _start
> >  (/home/milian/projects/src/perf-tests/inlining)
> > 
> > After:
> >214f7 __hypot_finite (/usr/lib/libm-2.25.so)
> >
> > ace3 hypot (/usr/lib/libm-2.25.so)
> > 
> >  std::__complex_abs (inlined)
> >  std::abs (inlined)
> >  std::_Norm_helper::_S_do_it
> >  (inlined)
> >  std::norm (inlined)
> 
> Shouldn't they have 'a4a' too?

Yes, I think I forgot to update the commit message after I changed the 
behavior to keep compatibility with stackcollapse-perf.pl.

Will update the message.

Thanks

-- 
Milian Wolff | milian.wo...@kdab.com | Software Engineer
KDAB (Deutschland) GmbH KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts

smime.p7s
Description: S/MIME cryptographic signature


Re: [PATCH 7/7] perf script: mark inlined frames and do not print DSO for them

2017-05-24 Thread Milian Wolff
On Monday, May 22, 2017 2:11:58 PM CEST Namhyung Kim wrote:
> On Thu, May 18, 2017 at 09:34:11PM +0200, Milian Wolff wrote:
> > Instead of showing the (repeated) DSO name of the non-inlined
> > frame, we now show the "(inlined)" suffix instead.
> > 
> > Before:
> >214f7 __hypot_finite (/usr/lib/libm-2.25.so)
> >
> > ace3 hypot (/usr/lib/libm-2.25.so)
> > 
> >  std::__complex_abs
> >  (/home/milian/projects/src/perf-tests/inlining)
> >  std::abs
> >  (/home/milian/projects/src/perf-tests/inlining)
> >  std::_Norm_helper::_S_do_it
> >  (/home/milian/projects/src/perf-tests/inlining)
> >  std::norm
> >  (/home/milian/projects/src/perf-tests/inlining)
> >  
> >  a4a main
> >  (/home/milian/projects/src/perf-tests/inlining)
> >
> >20510 __libc_start_main (/usr/lib/libc-2.25.so)
> >
> >  bd9 _start
> >  (/home/milian/projects/src/perf-tests/inlining)
> > 
> > After:
> >214f7 __hypot_finite (/usr/lib/libm-2.25.so)
> >
> > ace3 hypot (/usr/lib/libm-2.25.so)
> > 
> >  std::__complex_abs (inlined)
> >  std::abs (inlined)
> >  std::_Norm_helper::_S_do_it
> >  (inlined)
> >  std::norm (inlined)
> 
> Shouldn't they have 'a4a' too?

Yes, I think I forgot to update the commit message after I changed the 
behavior to keep compatibility with stackcollapse-perf.pl.

Will update the message.

Thanks

-- 
Milian Wolff | milian.wo...@kdab.com | Software Engineer
KDAB (Deutschland) GmbH KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts

smime.p7s
Description: S/MIME cryptographic signature


Re: [PATCH 7/7] perf script: mark inlined frames and do not print DSO for them

2017-05-22 Thread Namhyung Kim
On Thu, May 18, 2017 at 09:34:11PM +0200, Milian Wolff wrote:
> Instead of showing the (repeated) DSO name of the non-inlined
> frame, we now show the "(inlined)" suffix instead.
> 
> Before:
>214f7 __hypot_finite (/usr/lib/libm-2.25.so)
> ace3 hypot (/usr/lib/libm-2.25.so)
>  std::__complex_abs 
> (/home/milian/projects/src/perf-tests/inlining)
>  std::abs 
> (/home/milian/projects/src/perf-tests/inlining)
>  std::_Norm_helper::_S_do_it 
> (/home/milian/projects/src/perf-tests/inlining)
>  std::norm 
> (/home/milian/projects/src/perf-tests/inlining)
>  a4a main (/home/milian/projects/src/perf-tests/inlining)
>20510 __libc_start_main (/usr/lib/libc-2.25.so)
>  bd9 _start 
> (/home/milian/projects/src/perf-tests/inlining)
> 
> After:
>214f7 __hypot_finite (/usr/lib/libm-2.25.so)
> ace3 hypot (/usr/lib/libm-2.25.so)
>  std::__complex_abs (inlined)
>  std::abs (inlined)
>  std::_Norm_helper::_S_do_it (inlined)
>  std::norm (inlined)

Shouldn't they have 'a4a' too?

Thanks,
Namhyung


>  a4a main (/home/milian/projects/src/perf-tests/inlining)
>20510 __libc_start_main (/usr/lib/libc-2.25.so)
>  bd9 _start 
> (/home/milian/projects/src/perf-tests/inlining)
> 
> Cc: Arnaldo Carvalho de Melo 
> Cc: David Ahern 
> Cc: Namhyung Kim 
> Cc: Peter Zijlstra 
> Cc: Yao Jin 
> Signed-off-by: Milian Wolff 
> ---
>  tools/perf/util/evsel_fprintf.c | 5 -
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/evsel_fprintf.c b/tools/perf/util/evsel_fprintf.c
> index f2c6c5ee11e8..5b9e89257aa7 100644
> --- a/tools/perf/util/evsel_fprintf.c
> +++ b/tools/perf/util/evsel_fprintf.c
> @@ -157,7 +157,7 @@ int sample__fprintf_callchain(struct perf_sample *sample, 
> int left_alignment,
>   }
>   }
>  
> - if (print_dso) {
> + if (print_dso && (!node->sym || !node->sym->inlined)) {
>   printed += fprintf(fp, " (");
>   printed += map__fprintf_dsoname(node->map, fp);
>   printed += fprintf(fp, ")");
> @@ -166,6 +166,9 @@ int sample__fprintf_callchain(struct perf_sample *sample, 
> int left_alignment,
>   if (print_srcline)
>   printed += map__fprintf_srcline(node->map, 
> addr, "\n  ", fp);
>  
> + if (node->sym && node->sym->inlined)
> + printed += fprintf(fp, " (inlined)");
> +
>   if (!print_oneline)
>   printed += fprintf(fp, "\n");
>  
> -- 
> 2.13.0
> 


Re: [PATCH 7/7] perf script: mark inlined frames and do not print DSO for them

2017-05-22 Thread Namhyung Kim
On Thu, May 18, 2017 at 09:34:11PM +0200, Milian Wolff wrote:
> Instead of showing the (repeated) DSO name of the non-inlined
> frame, we now show the "(inlined)" suffix instead.
> 
> Before:
>214f7 __hypot_finite (/usr/lib/libm-2.25.so)
> ace3 hypot (/usr/lib/libm-2.25.so)
>  std::__complex_abs 
> (/home/milian/projects/src/perf-tests/inlining)
>  std::abs 
> (/home/milian/projects/src/perf-tests/inlining)
>  std::_Norm_helper::_S_do_it 
> (/home/milian/projects/src/perf-tests/inlining)
>  std::norm 
> (/home/milian/projects/src/perf-tests/inlining)
>  a4a main (/home/milian/projects/src/perf-tests/inlining)
>20510 __libc_start_main (/usr/lib/libc-2.25.so)
>  bd9 _start 
> (/home/milian/projects/src/perf-tests/inlining)
> 
> After:
>214f7 __hypot_finite (/usr/lib/libm-2.25.so)
> ace3 hypot (/usr/lib/libm-2.25.so)
>  std::__complex_abs (inlined)
>  std::abs (inlined)
>  std::_Norm_helper::_S_do_it (inlined)
>  std::norm (inlined)

Shouldn't they have 'a4a' too?

Thanks,
Namhyung


>  a4a main (/home/milian/projects/src/perf-tests/inlining)
>20510 __libc_start_main (/usr/lib/libc-2.25.so)
>  bd9 _start 
> (/home/milian/projects/src/perf-tests/inlining)
> 
> Cc: Arnaldo Carvalho de Melo 
> Cc: David Ahern 
> Cc: Namhyung Kim 
> Cc: Peter Zijlstra 
> Cc: Yao Jin 
> Signed-off-by: Milian Wolff 
> ---
>  tools/perf/util/evsel_fprintf.c | 5 -
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/evsel_fprintf.c b/tools/perf/util/evsel_fprintf.c
> index f2c6c5ee11e8..5b9e89257aa7 100644
> --- a/tools/perf/util/evsel_fprintf.c
> +++ b/tools/perf/util/evsel_fprintf.c
> @@ -157,7 +157,7 @@ int sample__fprintf_callchain(struct perf_sample *sample, 
> int left_alignment,
>   }
>   }
>  
> - if (print_dso) {
> + if (print_dso && (!node->sym || !node->sym->inlined)) {
>   printed += fprintf(fp, " (");
>   printed += map__fprintf_dsoname(node->map, fp);
>   printed += fprintf(fp, ")");
> @@ -166,6 +166,9 @@ int sample__fprintf_callchain(struct perf_sample *sample, 
> int left_alignment,
>   if (print_srcline)
>   printed += map__fprintf_srcline(node->map, 
> addr, "\n  ", fp);
>  
> + if (node->sym && node->sym->inlined)
> + printed += fprintf(fp, " (inlined)");
> +
>   if (!print_oneline)
>   printed += fprintf(fp, "\n");
>  
> -- 
> 2.13.0
> 


[PATCH 7/7] perf script: mark inlined frames and do not print DSO for them

2017-05-18 Thread Milian Wolff
Instead of showing the (repeated) DSO name of the non-inlined
frame, we now show the "(inlined)" suffix instead.

Before:
   214f7 __hypot_finite (/usr/lib/libm-2.25.so)
ace3 hypot (/usr/lib/libm-2.25.so)
 std::__complex_abs 
(/home/milian/projects/src/perf-tests/inlining)
 std::abs 
(/home/milian/projects/src/perf-tests/inlining)
 std::_Norm_helper::_S_do_it 
(/home/milian/projects/src/perf-tests/inlining)
 std::norm 
(/home/milian/projects/src/perf-tests/inlining)
 a4a main (/home/milian/projects/src/perf-tests/inlining)
   20510 __libc_start_main (/usr/lib/libc-2.25.so)
 bd9 _start (/home/milian/projects/src/perf-tests/inlining)

After:
   214f7 __hypot_finite (/usr/lib/libm-2.25.so)
ace3 hypot (/usr/lib/libm-2.25.so)
 std::__complex_abs (inlined)
 std::abs (inlined)
 std::_Norm_helper::_S_do_it (inlined)
 std::norm (inlined)
 a4a main (/home/milian/projects/src/perf-tests/inlining)
   20510 __libc_start_main (/usr/lib/libc-2.25.so)
 bd9 _start (/home/milian/projects/src/perf-tests/inlining)

Cc: Arnaldo Carvalho de Melo 
Cc: David Ahern 
Cc: Namhyung Kim 
Cc: Peter Zijlstra 
Cc: Yao Jin 
Signed-off-by: Milian Wolff 
---
 tools/perf/util/evsel_fprintf.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/evsel_fprintf.c b/tools/perf/util/evsel_fprintf.c
index f2c6c5ee11e8..5b9e89257aa7 100644
--- a/tools/perf/util/evsel_fprintf.c
+++ b/tools/perf/util/evsel_fprintf.c
@@ -157,7 +157,7 @@ int sample__fprintf_callchain(struct perf_sample *sample, 
int left_alignment,
}
}
 
-   if (print_dso) {
+   if (print_dso && (!node->sym || !node->sym->inlined)) {
printed += fprintf(fp, " (");
printed += map__fprintf_dsoname(node->map, fp);
printed += fprintf(fp, ")");
@@ -166,6 +166,9 @@ int sample__fprintf_callchain(struct perf_sample *sample, 
int left_alignment,
if (print_srcline)
printed += map__fprintf_srcline(node->map, 
addr, "\n  ", fp);
 
+   if (node->sym && node->sym->inlined)
+   printed += fprintf(fp, " (inlined)");
+
if (!print_oneline)
printed += fprintf(fp, "\n");
 
-- 
2.13.0



[PATCH 7/7] perf script: mark inlined frames and do not print DSO for them

2017-05-18 Thread Milian Wolff
Instead of showing the (repeated) DSO name of the non-inlined
frame, we now show the "(inlined)" suffix instead.

Before:
   214f7 __hypot_finite (/usr/lib/libm-2.25.so)
ace3 hypot (/usr/lib/libm-2.25.so)
 std::__complex_abs 
(/home/milian/projects/src/perf-tests/inlining)
 std::abs 
(/home/milian/projects/src/perf-tests/inlining)
 std::_Norm_helper::_S_do_it 
(/home/milian/projects/src/perf-tests/inlining)
 std::norm 
(/home/milian/projects/src/perf-tests/inlining)
 a4a main (/home/milian/projects/src/perf-tests/inlining)
   20510 __libc_start_main (/usr/lib/libc-2.25.so)
 bd9 _start (/home/milian/projects/src/perf-tests/inlining)

After:
   214f7 __hypot_finite (/usr/lib/libm-2.25.so)
ace3 hypot (/usr/lib/libm-2.25.so)
 std::__complex_abs (inlined)
 std::abs (inlined)
 std::_Norm_helper::_S_do_it (inlined)
 std::norm (inlined)
 a4a main (/home/milian/projects/src/perf-tests/inlining)
   20510 __libc_start_main (/usr/lib/libc-2.25.so)
 bd9 _start (/home/milian/projects/src/perf-tests/inlining)

Cc: Arnaldo Carvalho de Melo 
Cc: David Ahern 
Cc: Namhyung Kim 
Cc: Peter Zijlstra 
Cc: Yao Jin 
Signed-off-by: Milian Wolff 
---
 tools/perf/util/evsel_fprintf.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/evsel_fprintf.c b/tools/perf/util/evsel_fprintf.c
index f2c6c5ee11e8..5b9e89257aa7 100644
--- a/tools/perf/util/evsel_fprintf.c
+++ b/tools/perf/util/evsel_fprintf.c
@@ -157,7 +157,7 @@ int sample__fprintf_callchain(struct perf_sample *sample, 
int left_alignment,
}
}
 
-   if (print_dso) {
+   if (print_dso && (!node->sym || !node->sym->inlined)) {
printed += fprintf(fp, " (");
printed += map__fprintf_dsoname(node->map, fp);
printed += fprintf(fp, ")");
@@ -166,6 +166,9 @@ int sample__fprintf_callchain(struct perf_sample *sample, 
int left_alignment,
if (print_srcline)
printed += map__fprintf_srcline(node->map, 
addr, "\n  ", fp);
 
+   if (node->sym && node->sym->inlined)
+   printed += fprintf(fp, " (inlined)");
+
if (!print_oneline)
printed += fprintf(fp, "\n");
 
-- 
2.13.0