Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp599119pxu; Wed, 14 Oct 2020 09:00:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUutZjcI06NM7UCZtwbGZzS02RrqLMulv7dLvbVeN05f6QW8XnFWrrziVPaAy/C5HMZDYr X-Received: by 2002:a17:907:43ed:: with SMTP id ol21mr5886480ejb.279.1602691209473; Wed, 14 Oct 2020 09:00:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602691209; cv=none; d=google.com; s=arc-20160816; b=H0YEP02SV3an6wFQ4ZqPiDdR6QxmytRku+oUM62pTPT4XvTQddhM5spOsMYVveDASC bo3zLskJMZm6mw+N04qe7qxdZj+1y4su9HLnEqhu/G8e/s3TBaCbGepcbPy46K0yCHB1 MbRUIJe7p8FQuevjVdRYo01mnCvD8bopXqdzZBTtVVeUgLS0QmcPAKMoLrg5lyaL0YIR WmzETq9/oj8F2rvAM3Ho6wGX6FtWLMRx9XKqt3QSCtGPsBuxpWto0/w6zllAGP5WD/ts 1Y3HvYmm92+UC5snEUGLAm5Oxp34zL8YEevXpTliGRmYQSFLqjAf26WoZNWSs8VMfVsI vZqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=+bKkLKMhPh4D3H3nN/BuKx9lLGEUVBWYV/8tIbDA7r4=; b=W9cwb1q2/DZl5vUpPIVPwTsDi+Dx+JBrnfigE5/RpxcPpzrulMOxstMNMWPxQSXiP6 JU1x1GatRoqSAWwdaqlBrMZJtkMfNUpqZ5WJhac+YN4GPt/WTqnE5mW04bbJYBeuLNa7 Zs44abyHIHfPMkCnEyjyBF2VeLwrHCX0Z13x6c+zjUbb9zBIPosSJ6afh/EBHP/jaZ0y 0NlasW1vUm5jpmXqSRDNPC4sg6lICc9xTcgO/BdSJ3SPAmpyxYuII5sA64e+v7qWyOfm uszRWqgwRFM2RlZc7XjqqHondVRa8GH0S1GyeqdahDBBOqDGktwo4/bJjXU9unR0TvsY urVQ== 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x12si31807eje.374.2020.10.14.08.59.46; Wed, 14 Oct 2020 09:00: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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730054AbgJNKwP (ORCPT + 99 others); Wed, 14 Oct 2020 06:52:15 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:39839 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725922AbgJNKwO (ORCPT ); Wed, 14 Oct 2020 06:52:14 -0400 Received: by mail-wm1-f66.google.com with SMTP id d3so2080839wma.4 for ; Wed, 14 Oct 2020 03:52:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+bKkLKMhPh4D3H3nN/BuKx9lLGEUVBWYV/8tIbDA7r4=; b=G0l6ycPv3tVhVcMEZtmSXedRak/4giHRASCdtrfySaWHMBx7QtPjQAFHUcb0FuB/BI iNiWLmO3Q+i+KCcs18WPSfE6hbdK8MMsiLYAcqandlJXnKpjCUIO2BcS5yCuVX8uDXGQ Xdi11zEq0Y1xdK1NEJZq38XPw4IWiG2IPvGFEteYDYgENikSa+eDZdOlB2DaeEOLHoMi TtaZ8XXZOoYHo9zrLjh0YlrmTiH7aHdGM1U3nEqunULqd53jwPkSJ/dTBNVZMKcYwp9C qAoZ5lQOgMYHQlp1E4gFWQx+AB89gmI5GIZfqrf80ZVgEFA2fcNwZ/iAl4RSUZyIOBG7 L21w== X-Gm-Message-State: AOAM531zYtIjMosd6DXODoSdJ9T3GXviLx9PprYnAV75dkIZxHat8HqK HELwliSpdf2qCEPFaMFQRTvs2eCLYFIE37isujk= X-Received: by 2002:a05:600c:2211:: with SMTP id z17mr2971926wml.92.1602672732991; Wed, 14 Oct 2020 03:52:12 -0700 (PDT) MIME-Version: 1.0 References: <810f3a69-0004-9dff-a911-b7ff97220ae0@linux.intel.com> <0652b8dd-e753-7c10-27e9-af9524e7ccc5@linux.intel.com> In-Reply-To: <0652b8dd-e753-7c10-27e9-af9524e7ccc5@linux.intel.com> From: Namhyung Kim Date: Wed, 14 Oct 2020 19:52:01 +0900 Message-ID: Subject: Re: [PATCH v1 08/15] perf record: write trace data into mmap trace files To: Alexey Budankov Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Alexander Shishkin , Andi Kleen , Adrian Hunter , Peter Zijlstra , Ingo Molnar , linux-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Thanks Namhyung