[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Question about xentrace to trace s_time_t type of data
Hi Konrad, Thank you very much for answering my question!
âI actually have a question regarding to your answer. Â Briefly speaking, I'm thinking what you suggests is doing the same (or similar) thing as I did? Below is my reason.
âIn file xen/include/xen/trace.h, TRACE_2D is defined as follows:
#define TRACE_2D(_e,d1,d2)Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â \ Â Â do {Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â \ Â Â Â Â if ( unlikely(tb_init_done) ) Â Â Â Â Â Â Â Â Â Â Â Â Â \ Â Â Â Â { Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â \ Â Â Â Â Â Â u32 _d[2];Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â \ Â Â Â Â Â Â _d[0] = d1; Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â \ Â Â Â Â Â Â _d[1] = d2; Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â \ Â Â Â Â Â Â __trace_var(_e, 1, sizeof(_d), _d); Â Â Â Â Â Â Â Â \ Â Â Â Â } Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â \ Â ÂÂ} while ( 0 )â âIn the same file, the trace_var() is defined as follows:
static inline void trace_var(u32 event, int cycles, int extra, ÂÂ Â Â Â Â Â Â Â Â Â Â Â Â Â const void *extra_data) { Â Â if ( unlikely(tb_init_done) ) Â Â Â Â __trace_var(event, cycles, extra, extra_data); } ÂÂâ â The description of the function __trace_var(u32 event, bool_t cycles,ÂunsignedÂintÂextra,constÂvoidÂ*extra_data)Âis in xen/common/trace.c:Â
/**   Â* __trace_var - Enters a trace tuple into the trace buffer for the current CPU. Â* @event: the event type being logged Â* @cycles: include tsc timestamp into trace record Â* @extra: size of additional trace data in bytes Â* @extra_data: pointer to additional trace data Â* Â* Logs a trace record into the appropriate buffer. Â*/â So I'm thinking what you suggests is doing the same (or similar) thing as I did? In addition, from the description of the function __trace_var() , it seems I should parse the pointer of the struct d to this function. âMaybe I misunderstood your suggestion?Â
Thank you very much for your time! Best, Mengâ Â ----------- Meng Xu PhD Student in Computer and Information Science University of Pennsylvania _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |