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


Groups > linux.kernel > #1232815 > unrolled thread

[PATCH 17/25] perf callchain: Allow for max_stack greater than PERF_MAX_STACK_DEPTH

Started byAdrian Hunter <adrian.hunter@intel.com>
First post2015-09-25 15:30 +0200
Last post2015-10-03 10:00 +0200
Articles 5 — 3 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 17/25] perf callchain: Allow for max_stack greater than PERF_MAX_STACK_DEPTH Adrian Hunter <adrian.hunter@intel.com> - 2015-09-25 15:30 +0200
    Re: [PATCH 17/25] perf callchain: Allow for max_stack greater than  PERF_MAX_STACK_DEPTH Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 22:10 +0200
      Re: [PATCH 17/25] perf callchain: Allow for max_stack greater than  PERF_MAX_STACK_DEPTH Adrian Hunter <adrian.hunter@intel.com> - 2015-09-29 10:20 +0200
        Re: [PATCH 17/25] perf callchain: Allow for max_stack greater than  PERF_MAX_STACK_DEPTH Adrian Hunter <adrian.hunter@intel.com> - 2015-10-01 13:50 +0200
    [tip:perf/core] perf callchain:   Allow for max_stack greater than PERF_MAX_STACK_DEPTH tip-bot for Adrian Hunter <tipbot@zytor.com> - 2015-10-03 10:00 +0200

#1232815 — [PATCH 17/25] perf callchain: Allow for max_stack greater than PERF_MAX_STACK_DEPTH

FromAdrian Hunter <adrian.hunter@intel.com>
Date2015-09-25 15:30 +0200
Subject[PATCH 17/25] perf callchain: Allow for max_stack greater than PERF_MAX_STACK_DEPTH
Message-ID<qcBez-2Eq-51@gated-at.bofh.it>
Adjust the validation to allow for max_stack greater than
PERF_MAX_STACK_DEPTH.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
 tools/perf/util/machine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index fd1efeafb343..d7bd9a304535 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -1831,7 +1831,7 @@ static int thread__resolve_callchain_sample(struct thread *thread,
 	}
 
 check_calls:
-	if (chain->nr > PERF_MAX_STACK_DEPTH) {
+	if (chain->nr > PERF_MAX_STACK_DEPTH && (int)chain->nr > max_stack) {
 		pr_warning("corrupted callchain. skipping...\n");
 		return 0;
 	}
-- 
1.9.1

--
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]


#1234409 — Re: [PATCH 17/25] perf callchain: Allow for max_stack greater than PERF_MAX_STACK_DEPTH

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2015-09-28 22:10 +0200
SubjectRe: [PATCH 17/25] perf callchain: Allow for max_stack greater than PERF_MAX_STACK_DEPTH
Message-ID<qdMUj-1fb-27@gated-at.bofh.it>
In reply to#1232815
Em Fri, Sep 25, 2015 at 04:15:48PM +0300, Adrian Hunter escreveu:
> Adjust the validation to allow for max_stack greater than
> PERF_MAX_STACK_DEPTH.
> 
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
>  tools/perf/util/machine.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
> index fd1efeafb343..d7bd9a304535 100644
> --- a/tools/perf/util/machine.c
> +++ b/tools/perf/util/machine.c
> @@ -1831,7 +1831,7 @@ static int thread__resolve_callchain_sample(struct thread *thread,
>  	}
>  
>  check_calls:
> -	if (chain->nr > PERF_MAX_STACK_DEPTH) {
> +	if (chain->nr > PERF_MAX_STACK_DEPTH && (int)chain->nr > max_stack) {

Both?

>  		pr_warning("corrupted callchain. skipping...\n");
>  		return 0;
>  	}
> -- 
> 1.9.1
--
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]


#1234802 — Re: [PATCH 17/25] perf callchain: Allow for max_stack greater than PERF_MAX_STACK_DEPTH

FromAdrian Hunter <adrian.hunter@intel.com>
Date2015-09-29 10:20 +0200
SubjectRe: [PATCH 17/25] perf callchain: Allow for max_stack greater than PERF_MAX_STACK_DEPTH
Message-ID<qdYiK-Pt-9@gated-at.bofh.it>
In reply to#1234409
On 28/09/15 23:08, Arnaldo Carvalho de Melo wrote:
> Em Fri, Sep 25, 2015 at 04:15:48PM +0300, Adrian Hunter escreveu:
>> Adjust the validation to allow for max_stack greater than
>> PERF_MAX_STACK_DEPTH.
>>
>> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
>> ---
>>  tools/perf/util/machine.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
>> index fd1efeafb343..d7bd9a304535 100644
>> --- a/tools/perf/util/machine.c
>> +++ b/tools/perf/util/machine.c
>> @@ -1831,7 +1831,7 @@ static int thread__resolve_callchain_sample(struct thread *thread,
>>  	}
>>  
>>  check_calls:
>> -	if (chain->nr > PERF_MAX_STACK_DEPTH) {
>> +	if (chain->nr > PERF_MAX_STACK_DEPTH && (int)chain->nr > max_stack) {
> 
> Both?

Yes.

In the case of a hardware generated callchain, the callchain can be up to
PERF_MAX_STACK_DEPTH but max_stack can be less than PERF_MAX_STACK_DEPTH to
limit the number processed.

In the case of a synthesized callchain, the callchain can be up to max_stack
which might be more than PERF_MAX_STACK_DEPTH.

> 
>>  		pr_warning("corrupted callchain. skipping...\n");
>>  		return 0;
>>  	}
>> -- 
>> 1.9.1
> 

--
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]


#1237305 — Re: [PATCH 17/25] perf callchain: Allow for max_stack greater than PERF_MAX_STACK_DEPTH

FromAdrian Hunter <adrian.hunter@intel.com>
Date2015-10-01 13:50 +0200
SubjectRe: [PATCH 17/25] perf callchain: Allow for max_stack greater than PERF_MAX_STACK_DEPTH
Message-ID<qeKx4-2WG-13@gated-at.bofh.it>
In reply to#1234802
On 29/09/15 11:16, Adrian Hunter wrote:
> On 28/09/15 23:08, Arnaldo Carvalho de Melo wrote:
>> Em Fri, Sep 25, 2015 at 04:15:48PM +0300, Adrian Hunter escreveu:
>>> Adjust the validation to allow for max_stack greater than
>>> PERF_MAX_STACK_DEPTH.
>>>
>>> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
>>> ---
>>>  tools/perf/util/machine.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
>>> index fd1efeafb343..d7bd9a304535 100644
>>> --- a/tools/perf/util/machine.c
>>> +++ b/tools/perf/util/machine.c
>>> @@ -1831,7 +1831,7 @@ static int thread__resolve_callchain_sample(struct thread *thread,
>>>  	}
>>>  
>>>  check_calls:
>>> -	if (chain->nr > PERF_MAX_STACK_DEPTH) {
>>> +	if (chain->nr > PERF_MAX_STACK_DEPTH && (int)chain->nr > max_stack) {
>>
>> Both?
> 
> Yes.
> 
> In the case of a hardware generated callchain, the callchain can be up to
> PERF_MAX_STACK_DEPTH but max_stack can be less than PERF_MAX_STACK_DEPTH to
> limit the number processed.
> 
> In the case of a synthesized callchain, the callchain can be up to max_stack
> which might be more than PERF_MAX_STACK_DEPTH.

Is this ok?

> 
>>
>>>  		pr_warning("corrupted callchain. skipping...\n");
>>>  		return 0;
>>>  	}
>>> -- 
>>> 1.9.1
>>
> 
> 

--
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]


#1238761 — [tip:perf/core] perf callchain: Allow for max_stack greater than PERF_MAX_STACK_DEPTH

Fromtip-bot for Adrian Hunter <tipbot@zytor.com>
Date2015-10-03 10:00 +0200
Subject[tip:perf/core] perf callchain: Allow for max_stack greater than PERF_MAX_STACK_DEPTH
Message-ID<qfpTA-40C-1@gated-at.bofh.it>
In reply to#1232815
Commit-ID:  0edd453368c6b9cdb756bde2b6675bb0d5d0eb0a
Gitweb:     http://git.kernel.org/tip/0edd453368c6b9cdb756bde2b6675bb0d5d0eb0a
Author:     Adrian Hunter <adrian.hunter@intel.com>
AuthorDate: Fri, 25 Sep 2015 16:15:48 +0300
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 1 Oct 2015 09:56:06 -0300

perf callchain: Allow for max_stack greater than PERF_MAX_STACK_DEPTH

Adjust the validation to allow for max_stack greater than
PERF_MAX_STACK_DEPTH.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1443186956-18718-18-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/machine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 76fe167..5ef90be 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -1831,7 +1831,7 @@ static int thread__resolve_callchain_sample(struct thread *thread,
 	}
 
 check_calls:
-	if (chain->nr > PERF_MAX_STACK_DEPTH) {
+	if (chain->nr > PERF_MAX_STACK_DEPTH && (int)chain->nr > max_stack) {
 		pr_warning("corrupted callchain. skipping...\n");
 		return 0;
 	}
--
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] | [standalone]


Back to top | Article view | linux.kernel


csiph-web