From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfE8j-0005hc-Pq for qemu-devel@nongnu.org; Thu, 14 Jun 2012 13:47:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SfE8i-0007BH-3b for qemu-devel@nongnu.org; Thu, 14 Jun 2012 13:47:25 -0400 Received: from e28smtp01.in.ibm.com ([122.248.162.1]:51212) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfE8h-0007A6-Ed for qemu-devel@nongnu.org; Thu, 14 Jun 2012 13:47:24 -0400 Received: from /spool/local by e28smtp01.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 14 Jun 2012 23:17:14 +0530 Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q5EHlBfD12190058 for ; Thu, 14 Jun 2012 23:17:12 +0530 Received: from d28av03.in.ibm.com (loopback [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q5ENGRcm013748 for ; Fri, 15 Jun 2012 09:16:28 +1000 Message-ID: <4FDA2399.8070200@linux.vnet.ibm.com> Date: Thu, 14 Jun 2012 23:17:05 +0530 From: Harsh Bora MIME-Version: 1.0 References: <1339680775-23610-1-git-send-email-harsh@linux.vnet.ibm.com> <1339680775-23610-3-git-send-email-harsh@linux.vnet.ibm.com> <4FD9EC67.5080301@linux.vnet.ibm.com> In-Reply-To: <4FD9EC67.5080301@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 2/3] Simpletrace v2: Support multiple arguments, strings. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Harsh Bora Cc: stefanha@gmail.com, qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com [...] Okay I think, I got it, let me dig a little further ... >> +void trace_record_finish(TraceBufferRecord *rec) >> { >> - trace(event, x1, x2, x3, x4, x5, x6); >> + uint8_t temp_rec[sizeof(TraceRecord)]; >> + TraceRecord *record = (TraceRecord *) temp_rec; >> + read_from_buffer(rec->tbuf_idx, temp_rec, sizeof(TraceRecord)); >> + __sync_synchronize(); /* write barrier before marking as valid */ >> + record->event |= TRACE_RECORD_VALID; >> + write_to_buffer(rec->tbuf_idx, temp_rec, sizeof(TraceRecord)); >> + >> + if ((trace_idx> writeout_idx)&& >> + (trace_idx - writeout_idx)> TRACE_BUF_FLUSH_THRESHOLD) { >> + flush_trace_file(false); >> + } else if ((writeout_idx> trace_idx)&& >> + (trace_idx> TRACE_BUF_FLUSH_THRESHOLD)) { I guess this was the culprit ^ .. Harsh