[ltt-dev] (forw) [chris.meyers.fsu at gmail.com: Re: ltt channel thread safe?]
Mathieu Desnoyers
compudj at krystal.dyndns.org
Thu Sep 9 12:40:24 EDT 2010
* 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
>
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list