Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp610570pxu; Wed, 14 Oct 2020 09:13:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYAaB1iyllKLUB8ftnNFoFN6H+sbzZY41KIe2mm2hcZtaSJ84PB8z1FxVfYEirbz1mrkn0 X-Received: by 2002:a17:907:68c:: with SMTP id wn12mr6098525ejb.202.1602691989018; Wed, 14 Oct 2020 09:13:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602691989; cv=none; d=google.com; s=arc-20160816; b=bLBtaVQ8ysBb3cUwwNOKbHB+oVCA4AxhGA8O3ER08+O4MC3MHyJzWVXjXVQ2LODdCe uouUWNxomVng5mExRMG46dmkajnmzX8Bbnlq9frweM2OtIS0D9UNmIQPZerzhqFCW4Oo zJaajsAhuCcM0e342M65yQJK626JTYWUyGBZN1RxKVzK1ariGVc/JiHL9Sz1V2zRtQY1 sbuVJ/cGq54hH3Mr3DrjvV3A24srrwAvORQhK4CbOu47TR1wrOoBFZaQh9vHSdE3sT1w BsiTzBQ7ojmIMVYOp0Cz2qZjFsmP3eAkwxAf0+YIekE9Aq9Wbs/RjUl+JyVX6PmoDElA TNyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:ironport-sdr:ironport-sdr; bh=6KI2Gm2dY6VKPiTBauNnMapeoNgEX8USCNL8sqeqFz4=; b=Xc8l3bvA7OsGCd8MPOoUKuqx/J6Re48vc3q1YYw4afnLWW4nFegx0AISW73sQOhxY5 8qM5yL0ElR79Cnqf2NI1pm4E+9ynvAMWerDOlcpo2Lr+ahkjVF27xdagBQfUgxEiKghb qm2yi6YmuAl/3Gs9QG0/ev5RzT4UOTii2u8uwxFpxzJzWstCerD+ytaXonXToYX5NZxF 8dFtK9mX+KztEMtsgr2dReiIqvQvgjgYb2sRW0GcZgZSrHh5zdSjE3vEKc2aIiF1F8EL NBScvXLdmA4FryseaXvXYOe2iT9AinnjVh+xvxoTqyY37FRNvbMZXhgOxehJkEf0XwGn M58A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id le15si55393ejb.91.2020.10.14.09.12.37; Wed, 14 Oct 2020 09:13:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727123AbgJNMJH (ORCPT + 99 others); Wed, 14 Oct 2020 08:09:07 -0400 Received: from mga17.intel.com ([192.55.52.151]:55510 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726462AbgJNMJG (ORCPT ); Wed, 14 Oct 2020 08:09:06 -0400 IronPort-SDR: jSoXj9Rmk5swizHfTOZdRbCNBcwDQTFH3Q1OqfYTB7wkQMaGVU5cK30OFbmqqZLr7IwT8a0APh gCT2PwKsDR2A== X-IronPort-AV: E=McAfee;i="6000,8403,9773"; a="145953659" X-IronPort-AV: E=Sophos;i="5.77,374,1596524400"; d="scan'208";a="145953659" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2020 05:09:05 -0700 IronPort-SDR: VHiQZi061gOdJ2cguYhr+PhjdOYUHuxbuF8Z+Wd7SboWu1nQa9UMqhWyo0dUwFUfvTlfVLmHpM 0NILskVqq1DQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,374,1596524400"; d="scan'208";a="318634456" Received: from linux.intel.com ([10.54.29.200]) by orsmga006.jf.intel.com with ESMTP; 14 Oct 2020 05:09:05 -0700 Received: from [10.249.230.73] (abudanko-mobl.ccr.corp.intel.com [10.249.230.73]) by linux.intel.com (Postfix) with ESMTP id 828625808A3; Wed, 14 Oct 2020 05:09:02 -0700 (PDT) Subject: Re: [PATCH v1 08/15] perf record: write trace data into mmap trace files To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Alexander Shishkin , Andi Kleen , Adrian Hunter , Peter Zijlstra , Ingo Molnar , linux-kernel References: <810f3a69-0004-9dff-a911-b7ff97220ae0@linux.intel.com> <0652b8dd-e753-7c10-27e9-af9524e7ccc5@linux.intel.com> From: Alexey Budankov Organization: Intel Corp. Message-ID: <81ffefab-ac4e-c51c-809a-b9ba96d6d867@linux.intel.com> Date: Wed, 14 Oct 2020 15:09:00 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 14.10.2020 13:52, Namhyung Kim wrote: > Hi, > > On Mon, Oct 12, 2020 at 6:01 PM Alexey Budankov > wrote: >> >> >> Write trace data into per mmap trace files located >> at data directory. Streaming thread adjusts its affinity >> according to mask of the buffer being processed. >> >> Signed-off-by: Alexey Budankov >> --- > [SNIP] >> @@ -1184,8 +1203,12 @@ static int record__mmap_read_evlist(struct record *rec, struct evlist *evlist, >> /* >> * Mark the round finished in case we wrote >> * at least one event. >> + * >> + * No need for round events in directory mode, >> + * because per-cpu maps and files have data >> + * sorted by kernel. >> */ >> - if (bytes_written != rec->bytes_written) >> + if (!record__threads_enabled(rec) && bytes_written != rec->bytes_written) >> rc = record__write(rec, NULL, &finished_round_event, sizeof(finished_round_event)); > > This means it needs to keep all events in the ordered events queue > when perf report processes the data, right? Looks so. Alexei