Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Dec 2013 16:05:09 -0500
From:      Pedro Giffuni <pfg@FreeBSD.org>
To:        Mike Ma <mikemandarine@gmail.com>,  "dtrace@freebsd.org" <dtrace@freebsd.org>
Subject:   Re: [CFT] Use vmem in dtrace
Message-ID:  <52AB7685.7080803@FreeBSD.org>
In-Reply-To: <CA%2Bcqwfe_v_XKdYGd-ocbEg4Ey5QHwRW1KoxSx5BAY0BPKMg6sw@mail.gmail.com>
References:  <CA%2Bcqwfe_v_XKdYGd-ocbEg4Ey5QHwRW1KoxSx5BAY0BPKMg6sw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Mike;

On 13.12.2013 02:17, Mike Ma wrote:
> Hi there,
>
> I'm a GSoC student this year, and Pedro guided me to dtrace recently.
>
> I'm sending my patch for a vmem task listed in the TODO list (12th 
> item), as there is vmem subsystem in FreeBSD 10/11 available now.
> Basically, it is to revert changes from this patch 
> http://lists.freebsd.org/pipermail/p4-projects/2008-January/023466.html
> And the main difference is that vmem_create and vmem_alloc take 
> different number of parameters on FreeBSD.
>
> I did run dtrace testsuite on my own machine.
> And I hope someone here can try my patch.
>
> Any comments are appreciated.

I did some purely cosmetic cleanups (tabs and use use of the #defines) 
and placed the patch here:

http://people.freebsd.org/~pfg/patches/dtrace/dtrace_vmem.diff

However, on

sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c

This chunk looks suspicious:

@@ -13160,10 +13160,10 @@
          state = kmem_zalloc(sizeof(dtrace_state_t), KM_SLEEP);
  #endif

+#if defined(sun)
          state->dts_epid = DTRACE_EPIDNONE + 1;

          (void) snprintf(c, sizeof (c), "dtrace_aggid_%d", m);
-#if defined(sun)
          state->dts_aggid_arena = vmem_create(c, (void *)1, UINT32_MAX, 1,
              NULL, NULL, NULL, 0, VM_SLEEP | VMC_IDENTIFIER);

_____


Any reason for removing the assignment and the snprintf out of FreeBSD 
and into sun-specific code?

FWIW, SUN's code also uses dtrace_minor but it seems like it may be for 
Solaris driver specific code. Not sure if it's worth investigating.

Regards,

Pedro.






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52AB7685.7080803>