public inbox for dwarves@vger.kernel.org
 help / color / mirror / Atom feed
From: "Alexis Lothoré" <alexis.lothore@bootlin.com>
To: "Alan Maguire" <alan.maguire@oracle.com>, <dwarves@vger.kernel.org>
Cc: "Ihor Solodrai" <ihor.solodrai@linux.dev>,
	"Arnaldo Carvalho de Melo" <acme@redhat.com>,
	<ebpf@linuxfoundation.org>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	"Bastien Curutchet" <bastien.curutchet@bootlin.com>
Subject: Re: [PATCH v2] pahole: do not return an error when printing only a specific class
Date: Thu, 31 Jul 2025 18:08:40 +0200	[thread overview]
Message-ID: <DBQDCOXBLOA9.A8R3S0BLIW08@bootlin.com> (raw)
In-Reply-To: <150ae6e2-08fb-4d47-84db-ccf1bd3996ad@oracle.com>

Hi Alan,

On Thu Jul 31, 2025 at 11:10 AM CEST, Alan Maguire wrote:
> On 30/07/2025 16:26, Alexis Lothoré (eBPF Foundation) wrote:

[...]

>> Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
>
> a few small things below, but
>
> Reviewed-by: Alan Maguire <alan.maguire@oracle.com>

[...]

>>  		case JOB_STEAL:
>> -			if (cus__steal_now(dcus->cus, job->cu, dcus->conf) == LSK__STOP_LOADING)
>> +			ret = cus__steal_now(dcus->cus, job->cu, dcus->conf);
>> +			if (ret == LSK__ABORT || ret == LSK__STOP_LOADING) {
>> +				dcus->lsk_status = ret;
>>  				goto out_abort;
>
> nit: I was thinking we could rename out_abort (rather than out_error) to
> out_early since we can exit due to either ABORT or STOP_LOADING now.

Yes, true, I did it for dwarf_cus__process_cus, but I forgot to do it here.
I'll update it here as well.

[...]

>> @@ -3386,15 +3386,16 @@ static enum load_steal_kind pahole_stealer(struct cu *cu, struct conf_load *conf
>>  	/*
>>  	 * If we found all the entries in --class_name, stop
>>  	 */
>> -	if (list_empty(&class_names)) {
>> -dump_and_stop:
>> +	if (list_empty(&class_names))
>>  		ret = LSK__STOP_LOADING;
>> -	}
>>  dump_it:
>>  	if (first_obj_only)
>>  		ret = LSK__STOP_LOADING;
>>  filter_it:
>>  	return ret;
>> +dump_and_abort:
>> +	ret = LSK__ABORT;
>> +	return ret;
>
> nit: we could just return LSK__ABORT at all the places we do "goto
> dump_and_abort" and avoid adding a new goto label here I think.

Ok, I'll add those few returns and get rid of this goto

Alexis

-- 
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


      reply	other threads:[~2025-07-31 16:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-30 15:26 [PATCH v2] pahole: do not return an error when printing only a specific class Alexis Lothoré (eBPF Foundation)
2025-07-31  9:10 ` Alan Maguire
2025-07-31 16:08   ` Alexis Lothoré [this message]

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=DBQDCOXBLOA9.A8R3S0BLIW08@bootlin.com \
    --to=alexis.lothore@bootlin.com \
    --cc=acme@redhat.com \
    --cc=alan.maguire@oracle.com \
    --cc=bastien.curutchet@bootlin.com \
    --cc=dwarves@vger.kernel.org \
    --cc=ebpf@linuxfoundation.org \
    --cc=ihor.solodrai@linux.dev \
    --cc=thomas.petazzoni@bootlin.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox