Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934101AbcKKQBf (ORCPT ); Fri, 11 Nov 2016 11:01:35 -0500 Received: from smtprelay0138.hostedemail.com ([216.40.44.138]:50609 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933929AbcKKQBd (ORCPT ); Fri, 11 Nov 2016 11:01:33 -0500 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:1801:2393:2553:2559:2562:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:4605:5007:6119:6261:6742:7875:7903:8531:8603:9036:10004:10400:10450:10455:10848:10967:11026:11232:11233:11658:11914:12043:12296:12438:12740:12760:13069:13311:13357:13439:13972:14096:14097:14181:14659:14721:19904:19999:21080:30054:30064:30070:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: day72_c6bc5f5b1908 X-Filterd-Recvd-Size: 2768 Date: Fri, 11 Nov 2016 11:01:23 -0500 From: Steven Rostedt To: Chunyan Zhang Cc: Mathieu Poirier , Alexander Shishkin , mingo@redhat.com, Mike Leach , Tor Jeremiassen , philippe.langlais@st.com, Nicolas GUION , Felipe Balbi , Lyra Zhang , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: ?? Message-ID: <20161111110123.019fc088@gandalf.local.home> In-Reply-To: References: X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1476 Lines: 49 On Fri, 11 Nov 2016 11:38:45 +0800 Chunyan Zhang wrote: What happened to the subject? > >>> +static void > >>> +trace_process_export(struct trace_export *export, > >>> + struct ring_buffer_event *event) > >>> +{ > >>> + struct trace_entry *entry; > >>> + unsigned int size = 0; > >>> + > >>> + entry = ring_buffer_event_data(event); > >>> + > >>> + size = ring_buffer_event_length(event); > >>> + > >>> + if (export->write) > >>> + export->write((char *)entry, size); > >> > >> Is there ever going to be a time where export->write wont be set? > > > > There hasn't been since only one trace_export (i.e. stm_ftrace) was > > added in this patch-set , I just wanted to make sure the write() has > > been set before registering trace_export like what I added in 2/3 of > > this series. > > > >> > >> And if there is, this can be racy. As in > >> > >> > >> CPU 0: CPU 1: > >> ------ ------ > >> if (export->write) > >> > >> export->write = NULL; > > > > Is there going to be this kind of use case? Why some one needs to > > change export->write() rather than register a new trace_export? > > > > I probably haven't understood your point thoroughly, please correct me > > if my guess was wrong. > > > > Any further comments? :) I don't remember which patch series this goes to, so right now, no. -- Steve