2008/5/9 Rafael Vanoni Wrote:
> Here's a patch for this one.
> Simple case of using uint64_t or 32_t for one of the arguments to
> dtrace_lookup_by_addr.
>

I'm not sure you found the root cause.
There are a few dtrace_lookup_by_addr calls under $(SRC)/lib/libdtrace/common,
they are always using (uint64_t *) as the pointer type. Any thoughts why?

Thanks,
-Aubrey



> Rafael
>
>
> Rafael Vanoni wrote:
>>
>> dtrace_lookup_by_addr is returning non zero values on 32 bit kernels for
>> most of the kernel events - on both OpenSolaris 2008.05 and Nevada booted
>> 32bit. This causes the event report to display hex values as opposed to
>> kernel symbols.
>>
>> I'm looking into it now.
>>
>> cheers
>> Rafael
>> _______________________________________________
>> tesla-dev mailing list
>> tesla-dev at opensolaris.org
>> http://mail.opensolaris.org/mailman/listinfo/tesla-dev
>
>
> # HG changeset patch
> # User rafael.vanoni at sun.com
> # Date 1210331662 -3600
> # Node ID 9e5216ec7db7491cd5008e0acaac3ca8be52e21a
> # Parent  bd7ee06b95c5f79fc2ff04eea235ad2338a2b5e6
> Event report displays hex values on 32bit kernel
>
> diff -r bd7ee06b95c5 -r 9e5216ec7db7 usr/src/cmd/powertop/events.c
> --- a/usr/src/cmd/powertop/events.c     Tue May 06 16:23:48 2008 +0100
> +++ b/usr/src/cmd/powertop/events.c     Fri May 09 12:14:22 2008 +0100
> @@ -40,6 +40,12 @@
>  #include <signal.h>
>
>  #include "powertop.h"
> +
> +#ifdef __amd64
> +typedef uint64_t offender_t;
> +#else
> +typedef uint32_t offender_t;
> +#endif
>
>  static dtrace_hdl_t *g_dtp;
>  /*
> @@ -119,7 +125,7 @@
>        dtrace_syminfo_t        dts;
>        char                    *offense_name;
>        char                    *offender_name;
> -       uint64_t                *offender_addr;
> +       offender_t              *offender_addr;
>        int32_t                 *instance;
>        int                     i;
>        uint64_t                n = 0;
> @@ -140,7 +146,7 @@
>
>        } else if (strcmp(aggdesc->dtagd_name, "events_k") == 0) {
>
> -               offender_addr = (uint64_t *)(data->dtada_data +
> rec1->dtrd_offset);
> +               offender_addr = (offender_t *)(data->dtada_data +
> rec1->dtrd_offset);
>
>                snprintf((char *)(p_event->offender_name), EVENT_NAME_MAX,
>                    "%s", "<kernel>");
>
> _______________________________________________
> tesla-dev mailing list
> tesla-dev at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/tesla-dev
>
>

Reply via email to