Linux s390 Architecture development
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@linux.ibm.com>
To: Heiko Carstens <hca@linux.ibm.com>
Cc: Ciunas Bennett <ciunas@linux.ibm.com>,
	linux-s390@vger.kernel.org, Janosch Frank <frankja@linux.ibm.com>,
	Claudio Imbrenda <imbrenda@linux.ibm.com>
Subject: Re: [PATCH 1/2] s390/kvm: Refactor __diag_time_slice_end_directed for single exit point
Date: Mon, 22 Jun 2026 09:18:36 +0200	[thread overview]
Message-ID: <abbb14be-e500-453d-84e7-07ff95f09a86@linux.ibm.com> (raw)
In-Reply-To: <20260619134920.18590Ec9-hca@linux.ibm.com>



Am 19.06.26 um 15:49 schrieb Heiko Carstens:
> On Fri, Jun 19, 2026 at 12:27:56PM +0200, Christian Borntraeger wrote:
>>> +	const char *result;
> ...
>>> +	result = "ignored";
>>> +out:
>>> +	VCPU_EVENT(vcpu, 5, "diag time slice end directed to %d: %s", tid,
>>> +		   result);
>>
>> result is a local variable that will go out of scope. You can not reference those
>> in the s390dbf feature as it will only store the string pointer and it will not
>> resolve the %s. So this wont work.
> 
> Why should this not work? The life time of result doesn't matter. The
> _content_ of 'result', which is a pointer to ro.data section, where
> the strings reside, is passed to the debug feature call. 'result' is
> not required to resolve "%s" later.
> 
> But maybe I miss your point?

No you are right. The string "ignored" and co are indeed not on the stack so
this will work.


  reply	other threads:[~2026-06-22  7:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-19 10:13 [PATCH 0/2] Improve DIAG 9c observability Ciunas Bennett
2026-06-19 10:13 ` [PATCH 1/2] s390/kvm: Refactor __diag_time_slice_end_directed for single exit point Ciunas Bennett
2026-06-19 10:27   ` Christian Borntraeger
2026-06-19 10:52     ` Ciunas Bennett
2026-06-19 13:49     ` Heiko Carstens
2026-06-22  7:18       ` Christian Borntraeger [this message]
2026-06-19 10:13 ` [PATCH 2/2] s390/kvm: Add tracepoint for DIAG 9c directed yield operations Ciunas Bennett

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=abbb14be-e500-453d-84e7-07ff95f09a86@linux.ibm.com \
    --to=borntraeger@linux.ibm.com \
    --cc=ciunas@linux.ibm.com \
    --cc=frankja@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    /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