[ECOS] Re: Type of event in eCos instrumentation record

Nodir Kodirov nodir.qodirov@gmail.com
Fri Apr 2 12:46:00 GMT 2010


Thank you John! That worked fine!

Now I have very a simple solution. I use eCos 3.0 and there is
cyg_instrument_msg(CYG_WORD16 type) function defined in
packages/kernel/v3_0/src/instrmnt/meminst.cxx file. This function is
supposed to take *CYG_WORD16 type* of instrumentation event as an
argument and return its string representation, as it is defined at
packages/kernel/v3_0/include/instrument_desc.h.

So, simply
> #include <cyg/kernel/instrument_desc.h>
> #include <cyg/kernel/instrmnt.h>
and
> char * message = cyg_instrument_msg(instrument_buffer[INDEX].type);
we will have a string representation of the instrumentation event.

Once again, a lot of thanks to all for hints!
Regards,
Nodir.

On 30 March 2010 20:49, John Dallaway <john@dallaway.org.uk> wrote:
> Hi Nodir
>
> Nodir Kodirov wrote:
>
>> Now I have two problems.
>> 1) All of the events are "unknown event". instrument_buffer[i].type
>> and instrument_desc[j].num does not match.
>> 2) If you look to struct instrument_desc_s instrument_desc[] there are
>> 125 instrumentation event types and for several event types, it has
>> the same number. So, my print_instr() I am taking the first occurred
>> one, while it is not always correct.
>
> Take at look at the dump_instr.c example code which locates the
> description string within instrument_desc[] in two stages:
>
> http://ecos.sourceware.org/cgi-bin/cvsweb.cgi/ecos/packages/kernel/current/host/instr/dump_instr.c?rev=1&content-type=text/x-cvsweb-markup&cvsroot=ecos
>
> I hope this helps...
>
> John Dallaway
> eCos maintainer
>

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list