Linux DTrace development list
 help / color / mirror / Atom feed
From: Kris Van Hees <kris.van.hees@oracle.com>
To: eugene.loh@oracle.com
Cc: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: Re: [PATCH 3/6] Simplify references to dtp
Date: Thu, 9 Jan 2025 14:21:51 -0500	[thread overview]
Message-ID: <Z4Ahz5gjk+G79DTC@oracle.com> (raw)
In-Reply-To: <20241220222716.18511-3-eugene.loh@oracle.com>

On Fri, Dec 20, 2024 at 05:27:13PM -0500, eugene.loh@oracle.com wrote:
> From: Eugene Loh <eugene.loh@oracle.com>
> 
> Signed-off-by: Eugene Loh <eugene.loh@oracle.com>

Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>

> ---
>  libdtrace/dt_pid.c | 17 ++++++++---------
>  1 file changed, 8 insertions(+), 9 deletions(-)
> 
> diff --git a/libdtrace/dt_pid.c b/libdtrace/dt_pid.c
> index 27cd7d13f..e57478450 100644
> --- a/libdtrace/dt_pid.c
> +++ b/libdtrace/dt_pid.c
> @@ -231,7 +231,7 @@ dt_pid_per_sym(dt_pid_probe_t *pp, const GElf_Sym *symp, const char *func)
>  
>  		psp->pps_nameoff = off;
>  		psp->pps_off = symp->st_value - pp->dpp_vaddr + off;
> -		if (dt_pid_create_one_probe(pp->dpp_pr, pp->dpp_dtp,
> +		if (dt_pid_create_one_probe(pp->dpp_pr, dtp,
>  					psp, symp, DTPPT_OFFSETS) < 0) {
>  			rc = dt_pid_error(
>  				dtp, pcb, dpr, D_PROC_CREATEFAIL,
> @@ -362,7 +362,7 @@ dt_pid_per_sym(dt_pid_probe_t *pp, const GElf_Sym *symp, const char *func)
>  
>  			psp->pps_nameoff = off;
>  			psp->pps_off = symp->st_value - pp->dpp_vaddr + off;
> -			if (dt_pid_create_one_probe(pp->dpp_pr, pp->dpp_dtp,
> +			if (dt_pid_create_one_probe(pp->dpp_pr, dtp,
>  						psp, symp, DTPPT_OFFSETS) >= 0)
>  				nmatches++;
>  		}
> @@ -434,7 +434,7 @@ dt_pid_per_mod(void *arg, const prmap_t *pmp, const char *obj)
>  	if (obj == NULL)
>  		return 0;
>  
> -	dt_Plmid(pp->dpp_dtp, pid, pmp->pr_vaddr, &pp->dpp_lmid);
> +	dt_Plmid(dtp, pid, pmp->pr_vaddr, &pp->dpp_lmid);
>  
>  	pp->dpp_dev = pmp->pr_dev;
>  	pp->dpp_inum = pmp->pr_inum;
> @@ -466,7 +466,7 @@ dt_pid_per_mod(void *arg, const prmap_t *pmp, const char *obj)
>  		 * just fail silently in the hopes that some other object will
>  		 * contain the desired symbol.
>  		 */
> -		if (dt_Pxlookup_by_name(pp->dpp_dtp, pid, pp->dpp_lmid, obj,
> +		if (dt_Pxlookup_by_name(dtp, pid, pp->dpp_lmid, obj,
>  					pp->dpp_func, &sym, NULL) != 0) {
>  			if (strcmp("-", pp->dpp_func) == 0) {
>  				sym.st_name = 0;
> @@ -496,17 +496,17 @@ dt_pid_per_mod(void *arg, const prmap_t *pmp, const char *obj)
>  		 * dynamically rewritten, and, so, inherently dicey to
>  		 * instrument.
>  		 */
> -		if (dt_Pwritable_mapping(pp->dpp_dtp, pid, sym.st_value))
> +		if (dt_Pwritable_mapping(dtp, pid, sym.st_value))
>  			return 0;
>  // FIXME:  why are we changing to a spelling that differs from what the user asked for?
> -		dt_Plookup_by_addr(pp->dpp_dtp, pid, sym.st_value,
> +		dt_Plookup_by_addr(dtp, pid, sym.st_value,
>  				   &pp->dpp_func, &sym);
>  
>  		return dt_pid_per_sym(pp, &sym, pp->dpp_func);
>  	} else {
>  		uint_t nmatches = pp->dpp_nmatches;
>  
> -		if (dt_Psymbol_iter_by_addr(pp->dpp_dtp, pid, obj, PR_SYMTAB,
> +		if (dt_Psymbol_iter_by_addr(dtp, pid, obj, PR_SYMTAB,
>  					    BIND_ANY | TYPE_FUNC,
>  					    dt_pid_sym_filt, pp) == 1)
>  			return 1;
> @@ -516,8 +516,7 @@ dt_pid_per_mod(void *arg, const prmap_t *pmp, const char *obj)
>  			 * If we didn't match anything in the PR_SYMTAB, try
>  			 * the PR_DYNSYM.
>  			 */
> -			if (dt_Psymbol_iter_by_addr(
> -					pp->dpp_dtp, pid, obj,
> +			if (dt_Psymbol_iter_by_addr(dtp, pid, obj,
>  					PR_DYNSYM, BIND_ANY | TYPE_FUNC,
>  					dt_pid_sym_filt, pp) == 1)
>  				return 1;
> -- 
> 2.43.5
> 

  reply	other threads:[~2025-01-09 19:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-20 22:27 [PATCH 1/6] Remove unused dpp_pc and dpp_size eugene.loh
2024-12-20 22:27 ` [PATCH 2/6] Use prb instead of psp.pps_prb eugene.loh
2024-12-20 22:27 ` [PATCH 3/6] Simplify references to dtp eugene.loh
2025-01-09 19:21   ` Kris Van Hees [this message]
2024-12-20 22:27 ` [PATCH 4/6] Remove unused function arg eugene.loh
2025-01-09 19:17   ` [DTrace-devel] " Kris Van Hees
2024-12-20 22:27 ` [PATCH 5/6] test: Move disassembly and extracting PCs earlier eugene.loh
2024-12-20 22:27 ` [PATCH 6/6] Add support for pid function "-" with absolute offset eugene.loh
2025-01-09 19:12   ` [DTrace-devel] " Kris Van Hees
2025-01-09 20:52     ` Eugene Loh
2025-01-09 21:00       ` Eugene Loh
2025-01-10  5:07         ` Kris Van Hees
2025-01-10  6:30           ` Eugene Loh
2025-01-10 14:47             ` Kris Van Hees
2025-01-09 19:14 ` [PATCH 1/6] Remove unused dpp_pc and dpp_size Kris Van Hees

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=Z4Ahz5gjk+G79DTC@oracle.com \
    --to=kris.van.hees@oracle.com \
    --cc=dtrace-devel@oss.oracle.com \
    --cc=dtrace@lists.linux.dev \
    --cc=eugene.loh@oracle.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