Hi all,

My requirement is that I need to log some binary data from the diver
and I can not do this with DoTraceMessage because of the formatting it
does. So can I directly call WmiTraceMessage (where I just need to
give a buffer pointer and length) instead of going through
DoTraceMessage (which is a macro around the former)? Will it have any
effect on the tracelog.exe/tracefmt.exe applications (in terms of log
formatting) that I run on user space? Or is there any other way of
logging binary data using Tracing?

Thanks,
Aniketa

Re: ETW/WPP Tracing question by Don

Don
Thu Jul 12 09:14:00 CDT 2007

How are you going to look at the data when you are done? If you want it
displayed in a hex dump or similar, then write the WPP tracing statements
as you want the data formatted in the end. Remember WPP does not convert
the data to text at the time of the trace statement, in fact most of the
data is binary.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply

"Aniketa K S" <aniketaks@rediffmail.com> wrote in message
news:1184248759.318405.309560@n60g2000hse.googlegroups.com...
>
> Hi all,
>
> My requirement is that I need to log some binary data from the diver
> and I can not do this with DoTraceMessage because of the formatting it
> does. So can I directly call WmiTraceMessage (where I just need to
> give a buffer pointer and length) instead of going through
> DoTraceMessage (which is a macro around the former)? Will it have any
> effect on the tracelog.exe/tracefmt.exe applications (in terms of log
> formatting) that I run on user space? Or is there any other way of
> logging binary data using Tracing?
>
> Thanks,
> Aniketa
>



Re: ETW/WPP Tracing question by Aniketa

Aniketa
Thu Jul 12 09:34:18 CDT 2007

On Jul 12, 7:14 pm, "Don Burn" <b...@stopspam.windrvr.com> wrote:
> How are you going to look at the data when you are done? If you want it
> displayed in a hex dump or similar, then write the WPP tracing statements
> as you want the data formatted in the end. Remember WPP does not convert
> the data to text at the time of the trace statement, in fact most of the
> data is binary.
>
> --
> Don Burn (MVP, Windows DDK)
> Windows 2k/XP/2k3 Filesystem and Driver Consulting
> Website:http://www.windrvr.com
> Blog:http://msmvps.com/blogs/WinDrvr
> Remove StopSpam to reply
>
> "Aniketa K S" <aniket...@rediffmail.com> wrote in messagenews:1184248759.318405.309560@n60g2000hse.googlegroups.com...
>
>
>
> > Hi all,
>
> > My requirement is that I need to log some binary data from the diver
> > and I can not do this with DoTraceMessage because of the formatting it
> > does. So can I directly call WmiTraceMessage (where I just need to
> > give a buffer pointer and length) instead of going through
> > DoTraceMessage (which is a macro around the former)? Will it have any
> > effect on the tracelog.exe/tracefmt.exe applications (in terms of log
> > formatting) that I run on user space? Or is there any other way of
> > logging binary data using Tracing?
>
> > Thanks,
> > Aniketa

Thanks Don.

Actually mine is a Miniport driver and the logs/binary data are coming
from the firmware running on NIC. We are offloading the parsing of
this data from driver to the user mode application. So the data we are
logging using tracing is in custom format. Can you please point me to
an example showing how to customize WPP tracing statements?

We also want to create multiple trace files (for driver/firmware/
statistics...) and I believe this can be achieved by starting multiple
tracing sessions with a unique GUID for each trace provider. Am I
right?

Thanks,
Aniketa


Re: ETW/WPP Tracing question by Don

Don
Thu Jul 12 09:54:24 CDT 2007


"Aniketa K S" <aniketaks@rediffmail.com> wrote in message >
> Actually mine is a Miniport driver and the logs/binary data are coming
> from the firmware running on NIC. We are offloading the parsing of
> this data from driver to the user mode application. So the data we are
> logging using tracing is in custom format. Can you please point me to
> an example showing how to customize WPP tracing statements?
>
> We also want to create multiple trace files (for driver/firmware/
> statistics...) and I believe this can be achieved by starting multiple
> tracing sessions with a unique GUID for each trace provider. Am I
> right?
>

I am not enough of a WPP expert to answer these. I recommend you go over
to the NTDEV group at http://www.osronline.com and look at the recent
discussion of WPP there. A developer for WPP from Microsoft has been
posting, so grab his address and ask the questions.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply



Re: ETW/WPP Tracing question by Eliyas

Eliyas
Sat Jul 14 10:38:17 CDT 2007

Take a look at the WDM version of toaster\featured2 sample. I think it shows
how to do the hexdump using WPP. I don't have the access to the source code
right now. If it's not in toaster then check the PCIDRV sample. I remember
demonstrating this functionality in one of these samples.

-Eliyas


"Aniketa K S" <aniketaks@rediffmail.com> wrote in message
news:1184250858.439951.189060@n2g2000hse.googlegroups.com...
> On Jul 12, 7:14 pm, "Don Burn" <b...@stopspam.windrvr.com> wrote:
>> How are you going to look at the data when you are done? If you want it
>> displayed in a hex dump or similar, then write the WPP tracing statements
>> as you want the data formatted in the end. Remember WPP does not convert
>> the data to text at the time of the trace statement, in fact most of the
>> data is binary.
>>
>> --
>> Don Burn (MVP, Windows DDK)
>> Windows 2k/XP/2k3 Filesystem and Driver Consulting
>> Website:http://www.windrvr.com
>> Blog:http://msmvps.com/blogs/WinDrvr
>> Remove StopSpam to reply
>>
>> "Aniketa K S" <aniket...@rediffmail.com> wrote in
>> messagenews:1184248759.318405.309560@n60g2000hse.googlegroups.com...
>>
>>
>>
>> > Hi all,
>>
>> > My requirement is that I need to log some binary data from the diver
>> > and I can not do this with DoTraceMessage because of the formatting it
>> > does. So can I directly call WmiTraceMessage (where I just need to
>> > give a buffer pointer and length) instead of going through
>> > DoTraceMessage (which is a macro around the former)? Will it have any
>> > effect on the tracelog.exe/tracefmt.exe applications (in terms of log
>> > formatting) that I run on user space? Or is there any other way of
>> > logging binary data using Tracing?
>>
>> > Thanks,
>> > Aniketa
>
> Thanks Don.
>
> Actually mine is a Miniport driver and the logs/binary data are coming
> from the firmware running on NIC. We are offloading the parsing of
> this data from driver to the user mode application. So the data we are
> logging using tracing is in custom format. Can you please point me to
> an example showing how to customize WPP tracing statements?
>
> We also want to create multiple trace files (for driver/firmware/
> statistics...) and I believe this can be achieved by starting multiple
> tracing sessions with a unique GUID for each trace provider. Am I
> right?
>
> Thanks,
> Aniketa
>



Re: ETW/WPP Tracing question by Aniketa

Aniketa
Mon Jul 16 07:43:58 CDT 2007

On Jul 14, 8:38 pm, "Eliyas Yakub [MSFT]"
<eliy...@online.discussion.microsoft.com> wrote:
> Take a look at the WDM version of toaster\featured2 sample. I think it shows
> how to do the hexdump using WPP. I don't have the access to the source code
> right now. If it's not in toaster then check the PCIDRV sample. I remember
> demonstrating this functionality in one of these samples.
>
> -Eliyas
>
> "Aniketa K S" <aniket...@rediffmail.com> wrote in messagenews:1184250858.439951.189060@n2g2000hse.googlegroups.com...
>
> > On Jul 12, 7:14 pm, "Don Burn" <b...@stopspam.windrvr.com> wrote:
> >> How are you going to look at the data when you are done? If you want it
> >> displayed in a hex dump or similar, then write the WPP tracing statements
> >> as you want the data formatted in the end. Remember WPP does not convert
> >> the data to text at the time of the trace statement, in fact most of the
> >> data is binary.
>
> >> --
> >> Don Burn (MVP, Windows DDK)
> >> Windows 2k/XP/2k3 Filesystem and Driver Consulting
> >> Website:http://www.windrvr.com
> >> Blog:http://msmvps.com/blogs/WinDrvr
> >> Remove StopSpam to reply
>
> >> "Aniketa K S" <aniket...@rediffmail.com> wrote in
> >> messagenews:1184248759.318405.309560@n60g2000hse.googlegroups.com...
>
> >> > Hi all,
>
> >> > My requirement is that I need to log some binary data from the diver
> >> > and I can not do this with DoTraceMessage because of the formatting it
> >> > does. So can I directly call WmiTraceMessage (where I just need to
> >> > give a buffer pointer and length) instead of going through
> >> > DoTraceMessage (which is a macro around the former)? Will it have any
> >> > effect on the tracelog.exe/tracefmt.exe applications (in terms of log
> >> > formatting) that I run on user space? Or is there any other way of
> >> > logging binary data using Tracing?
>
> >> > Thanks,
> >> > Aniketa
>
> > Thanks Don.
>
> > Actually mine is a Miniport driver and the logs/binary data are coming
> > from the firmware running on NIC. We are offloading the parsing of
> > this data from driver to the user mode application. So the data we are
> > logging using tracing is in custom format. Can you please point me to
> > an example showing how to customize WPP tracing statements?
>
> > We also want to create multiple trace files (for driver/firmware/
> > statistics...) and I believe this can be achieved by starting multiple
> > tracing sessions with a unique GUID for each trace provider. Am I
> > right?
>
> > Thanks,
> > Aniketa

It is in the PCIDRV sample. Thanks Eliyas for the pointer.

If Microsoft plans to expand the existing WPP extended format strings,
then the binary dump would be a good addition.

Aniketa