Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1303396 > unrolled thread

[PATCH 06/13] perf record: Store data mmaps for dwarf unwind

Started byJiri Olsa <jolsa@kernel.org>
First post2016-01-07 10:20 +0100
Last post2016-01-09 17:50 +0100
Articles 7 — 5 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 06/13] perf record: Store data mmaps for dwarf unwind Jiri Olsa <jolsa@kernel.org> - 2016-01-07 10:20 +0100
    Re: [PATCH 06/13] perf record: Store data mmaps for dwarf unwind Namhyung Kim <namhyung@kernel.org> - 2016-01-07 12:20 +0100
      [PATCHv2 06/13] perf record: Store data mmaps for dwarf unwind Jiri Olsa <jolsa@redhat.com> - 2016-01-07 13:40 +0100
        Re: [PATCHv2 06/13] perf record: Store data mmaps for dwarf unwind Namhyung Kim <namhyung@kernel.org> - 2016-01-07 14:20 +0100
          [PATCHv3 06/13] perf record: Store data mmaps for dwarf unwind Jiri Olsa <jolsa@redhat.com> - 2016-01-07 14:40 +0100
            Re: [PATCHv3 06/13] perf record: Store data mmaps for dwarf unwind Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-07 21:50 +0100
            [tip:perf/core] perf record: Store data mmaps for dwarf unwind tip-bot for Jiri Olsa <tipbot@zytor.com> - 2016-01-09 17:50 +0100

#1303396 — [PATCH 06/13] perf record: Store data mmaps for dwarf unwind

FromJiri Olsa <jolsa@kernel.org>
Date2016-01-07 10:20 +0100
Subject[PATCH 06/13] perf record: Store data mmaps for dwarf unwind
Message-ID<qOeTE-65o-19@gated-at.bofh.it>
Currently we don't synthesize data mmap by default. It depends
on -d option, that enables data address sampling.

But we've seen cases (softice) where DWARF unwinder went through
non executable mmaps, which we need to lookup in MAP__VARIABLE tree.

Making data mmaps to be synthesized for dwarf unwind as well.

Reported-by: Noel Grandin <noelgrandin@gmail.com>
Link: http://lkml.kernel.org/n/tip-lh02yir6qfycn8zr892rmlgg@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/builtin-record.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 9c5cdc2c4471..920b93edb497 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -804,6 +804,7 @@ int record_parse_callchain_opt(const struct option *opt,
 	int ret;
 	struct record_opts *record = (struct record_opts *)opt->value;
 
+	record->sample_address = true;
 	record->callgraph_set = true;
 	callchain_param.enabled = !unset;
 
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1303491

FromNamhyung Kim <namhyung@kernel.org>
Date2016-01-07 12:20 +0100
Message-ID<qOgLM-7kJ-17@gated-at.bofh.it>
In reply to#1303396
On Thu, Jan 07, 2016 at 10:14:03AM +0100, Jiri Olsa wrote:
> Currently we don't synthesize data mmap by default. It depends
> on -d option, that enables data address sampling.
> 
> But we've seen cases (softice) where DWARF unwinder went through
> non executable mmaps, which we need to lookup in MAP__VARIABLE tree.
> 
> Making data mmaps to be synthesized for dwarf unwind as well.
> 
> Reported-by: Noel Grandin <noelgrandin@gmail.com>
> Link: http://lkml.kernel.org/n/tip-lh02yir6qfycn8zr892rmlgg@git.kernel.org
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---
>  tools/perf/builtin-record.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> index 9c5cdc2c4471..920b93edb497 100644
> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -804,6 +804,7 @@ int record_parse_callchain_opt(const struct option *opt,
>  	int ret;
>  	struct record_opts *record = (struct record_opts *)opt->value;
>  
> +	record->sample_address = true;

It seems unconditionally set, no?

Thanks,
Namhyung


>  	record->callgraph_set = true;
>  	callchain_param.enabled = !unset;
>  
> -- 
> 2.4.3
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1303543 — [PATCHv2 06/13] perf record: Store data mmaps for dwarf unwind

FromJiri Olsa <jolsa@redhat.com>
Date2016-01-07 13:40 +0100
Subject[PATCHv2 06/13] perf record: Store data mmaps for dwarf unwind
Message-ID<qOi1c-86g-21@gated-at.bofh.it>
In reply to#1303491
On Thu, Jan 07, 2016 at 08:12:39PM +0900, Namhyung Kim wrote:
> On Thu, Jan 07, 2016 at 10:14:03AM +0100, Jiri Olsa wrote:
> > Currently we don't synthesize data mmap by default. It depends
> > on -d option, that enables data address sampling.
> > 
> > But we've seen cases (softice) where DWARF unwinder went through
> > non executable mmaps, which we need to lookup in MAP__VARIABLE tree.
> > 
> > Making data mmaps to be synthesized for dwarf unwind as well.
> > 
> > Reported-by: Noel Grandin <noelgrandin@gmail.com>
> > Link: http://lkml.kernel.org/n/tip-lh02yir6qfycn8zr892rmlgg@git.kernel.org
> > Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> > ---
> >  tools/perf/builtin-record.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> > index 9c5cdc2c4471..920b93edb497 100644
> > --- a/tools/perf/builtin-record.c
> > +++ b/tools/perf/builtin-record.c
> > @@ -804,6 +804,7 @@ int record_parse_callchain_opt(const struct option *opt,
> >  	int ret;
> >  	struct record_opts *record = (struct record_opts *)opt->value;
> >  
> > +	record->sample_address = true;
> 
> It seems unconditionally set, no?

ouch, I missed the unset cond down there.. v2 attached

thanks,
jirka


---
Currently we don't synthesize data mmap by default. It depends
on -d option, that enables data address sampling.

But we've seen cases (softice) where DWARF unwinder went through
non executable mmaps, which we need to lookup in MAP__VARIABLE tree.

Making data mmaps to be synthesized for dwarf unwind as well.

Reported-by: Noel Grandin <noelgrandin@gmail.com>
Link: http://lkml.kernel.org/n/tip-lh02yir6qfycn8zr892rmlgg@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/builtin-record.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 9c5cdc2c4471..465bde77f49b 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -815,8 +815,11 @@ int record_parse_callchain_opt(const struct option *opt,
 	}
 
 	ret = parse_callchain_record_opt(arg, &callchain_param);
-	if (!ret)
+	if (!ret) {
+		/* Enable data address sampling for DWARF unwind. */
+		record->sample_address = true;
 		callchain_debug();
+	}
 
 	return ret;
 }
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1303581 — Re: [PATCHv2 06/13] perf record: Store data mmaps for dwarf unwind

FromNamhyung Kim <namhyung@kernel.org>
Date2016-01-07 14:20 +0100
SubjectRe: [PATCHv2 06/13] perf record: Store data mmaps for dwarf unwind
Message-ID<qOiDT-9B-5@gated-at.bofh.it>
In reply to#1303543
On Thu, Jan 07, 2016 at 01:39:28PM +0100, Jiri Olsa wrote:
> Currently we don't synthesize data mmap by default. It depends
> on -d option, that enables data address sampling.
> 
> But we've seen cases (softice) where DWARF unwinder went through
> non executable mmaps, which we need to lookup in MAP__VARIABLE tree.
> 
> Making data mmaps to be synthesized for dwarf unwind as well.
> 
> Reported-by: Noel Grandin <noelgrandin@gmail.com>
> Link: http://lkml.kernel.org/n/tip-lh02yir6qfycn8zr892rmlgg@git.kernel.org
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---
>  tools/perf/builtin-record.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> index 9c5cdc2c4471..465bde77f49b 100644
> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -815,8 +815,11 @@ int record_parse_callchain_opt(const struct option *opt,
>  	}
>  
>  	ret = parse_callchain_record_opt(arg, &callchain_param);
> -	if (!ret)
> +	if (!ret) {
> +		/* Enable data address sampling for DWARF unwind. */
> +		record->sample_address = true;

How does it guarantee that it enables data address sampling only for
DWARF unwind?  Maybe you want this?

		if (callchain_param.record_mode == CALLCHAIN_DWARF)
			record->sample_address = true;


Thanks,
Namhyung


>  		callchain_debug();
> +	}
>  
>  	return ret;
>  }
> -- 
> 2.4.3
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1303592 — [PATCHv3 06/13] perf record: Store data mmaps for dwarf unwind

FromJiri Olsa <jolsa@redhat.com>
Date2016-01-07 14:40 +0100
Subject[PATCHv3 06/13] perf record: Store data mmaps for dwarf unwind
Message-ID<qOiXf-hG-1@gated-at.bofh.it>
In reply to#1303581
On Thu, Jan 07, 2016 at 10:14:14PM +0900, Namhyung Kim wrote:
> On Thu, Jan 07, 2016 at 01:39:28PM +0100, Jiri Olsa wrote:
> > Currently we don't synthesize data mmap by default. It depends
> > on -d option, that enables data address sampling.
> > 
> > But we've seen cases (softice) where DWARF unwinder went through
> > non executable mmaps, which we need to lookup in MAP__VARIABLE tree.
> > 
> > Making data mmaps to be synthesized for dwarf unwind as well.
> > 
> > Reported-by: Noel Grandin <noelgrandin@gmail.com>
> > Link: http://lkml.kernel.org/n/tip-lh02yir6qfycn8zr892rmlgg@git.kernel.org
> > Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> > ---
> >  tools/perf/builtin-record.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> > index 9c5cdc2c4471..465bde77f49b 100644
> > --- a/tools/perf/builtin-record.c
> > +++ b/tools/perf/builtin-record.c
> > @@ -815,8 +815,11 @@ int record_parse_callchain_opt(const struct option *opt,
> >  	}
> >  
> >  	ret = parse_callchain_record_opt(arg, &callchain_param);
> > -	if (!ret)
> > +	if (!ret) {
> > +		/* Enable data address sampling for DWARF unwind. */
> > +		record->sample_address = true;
> 
> How does it guarantee that it enables data address sampling only for
> DWARF unwind?  Maybe you want this?
> 
> 		if (callchain_param.record_mode == CALLCHAIN_DWARF)
> 			record->sample_address = true;

ugh.. too much coofee.. :-\ third time's a charm, v3 attached

thanks,
jirka


---
Currently we don't synthesize data mmap by default. It depends
on -d option, that enables data address sampling.

But we've seen cases (softice) where DWARF unwinder went through
non executable mmaps, which we need to lookup in MAP__VARIABLE tree.

Making data mmaps to be synthesized for dwarf unwind as well.

Reported-by: Noel Grandin <noelgrandin@gmail.com>
Link: http://lkml.kernel.org/n/tip-lh02yir6qfycn8zr892rmlgg@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/builtin-record.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 9c5cdc2c4471..dc4e0adf5c5b 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -815,8 +815,12 @@ int record_parse_callchain_opt(const struct option *opt,
 	}
 
 	ret = parse_callchain_record_opt(arg, &callchain_param);
-	if (!ret)
+	if (!ret) {
+		/* Enable data address sampling for DWARF unwind. */
+		if (callchain_param.record_mode == CALLCHAIN_DWARF)
+			record->sample_address = true;
 		callchain_debug();
+	}
 
 	return ret;
 }
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1303883 — Re: [PATCHv3 06/13] perf record: Store data mmaps for dwarf unwind

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2016-01-07 21:50 +0100
SubjectRe: [PATCHv3 06/13] perf record: Store data mmaps for dwarf unwind
Message-ID<qOpFp-4Sh-7@gated-at.bofh.it>
In reply to#1303592
Em Thu, Jan 07, 2016 at 02:30:22PM +0100, Jiri Olsa escreveu:
> On Thu, Jan 07, 2016 at 10:14:14PM +0900, Namhyung Kim wrote:
> > On Thu, Jan 07, 2016 at 01:39:28PM +0100, Jiri Olsa wrote:
> > > Currently we don't synthesize data mmap by default. It depends
> > > on -d option, that enables data address sampling.
> > > 
> > > But we've seen cases (softice) where DWARF unwinder went through
> > > non executable mmaps, which we need to lookup in MAP__VARIABLE tree.
> > > 
> > > Making data mmaps to be synthesized for dwarf unwind as well.
> > > 
> > > Reported-by: Noel Grandin <noelgrandin@gmail.com>
> > > Link: http://lkml.kernel.org/n/tip-lh02yir6qfycn8zr892rmlgg@git.kernel.org
> > > Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> > > ---
> > >  tools/perf/builtin-record.c | 5 ++++-
> > >  1 file changed, 4 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> > > index 9c5cdc2c4471..465bde77f49b 100644
> > > --- a/tools/perf/builtin-record.c
> > > +++ b/tools/perf/builtin-record.c
> > > @@ -815,8 +815,11 @@ int record_parse_callchain_opt(const struct option *opt,
> > >  	}
> > >  
> > >  	ret = parse_callchain_record_opt(arg, &callchain_param);
> > > -	if (!ret)
> > > +	if (!ret) {
> > > +		/* Enable data address sampling for DWARF unwind. */
> > > +		record->sample_address = true;
> > 
> > How does it guarantee that it enables data address sampling only for
> > DWARF unwind?  Maybe you want this?
> > 
> > 		if (callchain_param.record_mode == CALLCHAIN_DWARF)
> > 			record->sample_address = true;
> 
> ugh.. too much coofee.. :-\ third time's a charm, v3 attached

Noel, have you tested this latest patch? Does it fix things for you in
this latest iteration?

If so, can I stick a "Reported-and-Tested-by: Noel Grandin <>" to this?
 
> thanks,
> jirka
> 
> 
> ---
> Currently we don't synthesize data mmap by default. It depends
> on -d option, that enables data address sampling.
> 
> But we've seen cases (softice) where DWARF unwinder went through
> non executable mmaps, which we need to lookup in MAP__VARIABLE tree.
> 
> Making data mmaps to be synthesized for dwarf unwind as well.
> 
> Reported-by: Noel Grandin <noelgrandin@gmail.com>
> Link: http://lkml.kernel.org/n/tip-lh02yir6qfycn8zr892rmlgg@git.kernel.org
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---
>  tools/perf/builtin-record.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> index 9c5cdc2c4471..dc4e0adf5c5b 100644
> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -815,8 +815,12 @@ int record_parse_callchain_opt(const struct option *opt,
>  	}
>  
>  	ret = parse_callchain_record_opt(arg, &callchain_param);
> -	if (!ret)
> +	if (!ret) {
> +		/* Enable data address sampling for DWARF unwind. */
> +		if (callchain_param.record_mode == CALLCHAIN_DWARF)
> +			record->sample_address = true;
>  		callchain_debug();
> +	}
>  
>  	return ret;
>  }
> -- 
> 2.4.3

[toc] | [prev] | [next] | [standalone]


#1305322 — [tip:perf/core] perf record: Store data mmaps for dwarf unwind

Fromtip-bot for Jiri Olsa <tipbot@zytor.com>
Date2016-01-09 17:50 +0100
Subject[tip:perf/core] perf record: Store data mmaps for dwarf unwind
Message-ID<qP4Se-8c3-17@gated-at.bofh.it>
In reply to#1303592
Commit-ID:  5c0cf22477eaa890beeb4bc3554e5bebbea4b007
Gitweb:     http://git.kernel.org/tip/5c0cf22477eaa890beeb4bc3554e5bebbea4b007
Author:     Jiri Olsa <jolsa@redhat.com>
AuthorDate: Thu, 7 Jan 2016 14:30:22 +0100
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 8 Jan 2016 14:17:45 -0300

perf record: Store data mmaps for dwarf unwind

Currently we don't synthesize data mmap by default. It depends on -d
option, that enables data address sampling.

But we've seen cases (softice) where DWARF unwinder went through non
executable mmaps, which we need to lookup in MAP__VARIABLE tree.

Making data mmaps to be synthesized for dwarf unwind as well.

Reported-by: Noel Grandin <noelgrandin@gmail.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20160107133022.GA32115@krava.brq.redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-record.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 9c5cdc2c4..dc4e0ad 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -815,8 +815,12 @@ int record_parse_callchain_opt(const struct option *opt,
 	}
 
 	ret = parse_callchain_record_opt(arg, &callchain_param);
-	if (!ret)
+	if (!ret) {
+		/* Enable data address sampling for DWARF unwind. */
+		if (callchain_param.record_mode == CALLCHAIN_DWARF)
+			record->sample_address = true;
 		callchain_debug();
+	}
 
 	return ret;
 }

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web