LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Thomas-Mich Richter <tmricht@linux.ibm.com>
To: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	brueckner@linux.vnet.ibm.com, heiko.carstens@de.ibm.com
Subject: Re: [PATCH 1/3] perf report: Fix OOM error in TUI mode on s390
Date: Thu, 23 May 2019 10:12:45 +0200	[thread overview]
Message-ID: <872a9844-2464-d92d-21b9-311174c0bae4@linux.ibm.com> (raw)
In-Reply-To: <20190522180812.GI30271@kernel.org>

On 5/22/19 8:08 PM, Arnaldo Carvalho de Melo wrote:
> Em Wed, May 22, 2019 at 04:45:59PM +0200, Thomas Richter escreveu:
>


.....

>>
>> This size kills the TUI interface when executing the following
>> code:
>>
>>   process_sample_event()
>>     hist_entry_iter__add()
>>       hist_iter__report_callback()
>>         hist_entry__inc_addr_samples()
>>           symbol__inc_addr_samples(symbol = __bss_stop)
>>             symbol__cycles_hist()
>>                annotated_source__alloc_histograms(...,
>> 				                symbol__size(sym),
>> 		                                ...)
>>
>> This function allocates memory to save sample histograms.
>> The symbol_size() marco is defined as sym->end - sym->start, which
>> results in above value of 0x3fe6e64a850 bytes and
>> the call to calloc() in annotated_source__alloc_histograms() fails.
> 
> Humm, why are we getting samples in that area? Is it some JITted thing
> like BPF? What is it?
> 
> Why not just not consider the calloc failure as fatal, and when/if the
> user asks for annotation on such symbol, tell the user that it wasn't
> possible to allocate N bytes for it?
> 
> - Arnaldo


I have not debugged why this sample address was recorded. BPF code was not
running.

I have no problem with making calloc() failure no fatal, however we might
still allocate large memory...

I will send a new patch.

-- 
Thomas Richter, Dept 3252, IBM s390 Linux Development, Boeblingen, Germany
--
Vorsitzender des Aufsichtsrats: Matthias Hartmann
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294


  reply	other threads:[~2019-05-23  8:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-22 14:45 [PATCH 0/3] Fix OOM in perf report " Thomas Richter
2019-05-22 14:45 ` [PATCH 1/3] perf report: Fix OOM error in TUI mode " Thomas Richter
2019-05-22 18:08   ` Arnaldo Carvalho de Melo
2019-05-23  8:12     ` Thomas-Mich Richter [this message]
2019-05-22 14:46 ` [PATCH 2/3] perf record: Fix kallsym map size for s390 Thomas Richter
2019-05-22 14:46 ` [PATCH 3/3] perf record: Fix s390 missing module symbol and warning for non-root users Thomas Richter
2019-05-22 18:03   ` Arnaldo Carvalho de Melo
2019-05-28 21:30   ` [tip:perf/urgent] " tip-bot for Thomas Richter

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=872a9844-2464-d92d-21b9-311174c0bae4@linux.ibm.com \
    --to=tmricht@linux.ibm.com \
    --cc=arnaldo.melo@gmail.com \
    --cc=brueckner@linux.vnet.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --subject='Re: [PATCH 1/3] perf report: Fix OOM error in TUI mode on s390' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).