From mboxrd@z Thu Jan 1 00:00:00 1970 From: david.goulet@polymtl.ca (David Goulet) Date: Thu, 09 Sep 2010 12:54:01 -0400 Subject: [ltt-dev] (forw) [chris.meyers.fsu@gmail.com: Re: ltt channel thread safe?] In-Reply-To: <20100909164024.GB15254@Krystal> References: <20100810210701.GA22197@Krystal> <20100811153945.GA2928@Krystal> <1281600205.8209.26.camel@david-desktop> <20100812134027.GA15650@Krystal> <1281685038.8209.116.camel@david-desktop> <20100813122418.GA32263@Krystal> <1282881078.21590.26.camel@david-desktop> <20100827170158.GA28849@Krystal> <4C887A6C.8070100@polymtl.ca> <20100909164024.GB15254@Krystal> Message-ID: <4C891129.6080806@polymtl.ca> Incoming patch. Cheers David On 10-09-09 12:40 PM, Mathieu Desnoyers wrote: > * Pierre-Marc Fournier (pierre-marc.fournier at polymtl.ca) wrote: >> On 08/27/2010 01:01 PM, Mathieu Desnoyers wrote: >>> * Fu Juntang(David) (juntang.fu at windriver.com) wrote: >>>> Hi,Mathieu: >>>> has the issue any update? >>>> >>>> please see my test case and the trace logs(in the attachment), from >>>> the trace log,we can see we can only see the trace datas from cpu_0: >>>> ust.myevent: 18161.506516049 >>>> (/home/Large_Space/Part_B/LogStore/LTTngLog_wrlinux-4.0/UST/UST_Logs/multi-thread/david-desktop-20100811163524864824113/11520_5504068123890634635/ust_0), 0, 0, , , 0, 0x0, MODE_UNKNOWN { firstthread = 2 } >>>> ust.myevent: 18163.506594856 >>>> (/home/Large_Space/Part_B/LogStore/LTTngLog_wrlinux-4.0/UST/UST_Logs/multi-thread/david-desktop-20100811163524864824113/11520_5504068123890634635/ust_0), 0, 0, , , 0, 0x0, MODE_UNKNOWN { firstthread = 3 } >>>> ust.myevent: 18165.506667869 >>>> (/home/Large_Space/Part_B/LogStore/LTTngLog_wrlinux-4.0/UST/UST_Logs/multi-thread/david-desktop-20100811163524864824113/11520_5504068123890634635/ust_0), 0, 0, , , 0, 0x0, MODE_UNKNOWN { firstthread = 5 } >>>> ust.myevent: 18167.506735881 >>>> (/home/Large_Space/Part_B/LogStore/LTTngLog_wrlinux-4.0/UST/UST_Logs/multi-thread/david-desktop-20100811163524864824113/11520_5504068123890634635/ust_0), 0, 0, , , 0, 0x0, MODE_UNKNOWN { firstthread = 7 } >>>> ust.myevent: 18169.506818732 >>>> (/home/Large_Space/Part_B/LogStore/LTTngLog_wrlinux-4.0/UST/UST_Logs/multi-thread/david-desktop-20100811163524864824113/11520_5504068123890634635/ust_0), 0, 0, , , 0, 0x0, MODE_UNKNOWN { firstthread = 8 } >>>> ust.myevent: 18171.506903062 >>>> (/home/Large_Space/Part_B/LogStore/LTTngLog_wrlinux-4.0/UST/UST_Logs/multi-thread/david-desktop-20100811163524864824113/11520_5504068123890634635/ust_0), 0, 0, , , 0, 0x0, MODE_UNKNOWN { firstthread = 10 } >>>> End trace set >>>> >>>> we missed the trace logs: >>>> trace_mark(ust, myevent, "secondthread %d", number); >>> >>> Oh, you created two events with same channel and same name, but with a >>> different first parameter name. This should be forbidden. UST should >>> take care of checking for these duplicate markers with non-matching >>> parameters. >>> >>> libust marker.c is checking for this, as it should: >>> >>> static int set_marker(struct marker_entry *entry, struct marker *elem, >>> int active) >>> { >>> int ret = 0; >>> WARN_ON(strcmp(entry->name, elem->name) != 0); >>> >>> if (entry->format) { >>> if (strcmp(entry->format, elem->format) != 0) { >>> DBG("Format mismatch for probe %s (%s), marker (%s)", >>> entry->name, >>> entry->format, >>> elem->format); >>> return -EPERM; >>> } >>> } else { >>> >>> Pierre-Marc, why it this only showing the warning if UST_DEBUG is >>> defined ? This should always spit out the warning. >>> >> >> Agreed, it should probably be a WARN or ERR. > > Nils/David, do you want to make a patch for this ? > > pmf, I guess handing me a commit access might be handy. > > Thanks! > > Mathieu > >> >> pmf >> > -- David Goulet LTTng project, DORSAL Lab. PGP/GPG : 1024D/16BD8563 BE3C 672B 9331 9796 291A 14C6 4AF7 C14B 16BD 8563