Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp197505pxa; Fri, 31 Jul 2020 09:39:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9ZLKjl1Tb7tN2aoimFDqLbAQByVfed3ugJVXfRC3RNEksJo9CovsBpRAwONjBe4c/C4Nl X-Received: by 2002:a17:906:140e:: with SMTP id p14mr4982902ejc.430.1596213544379; Fri, 31 Jul 2020 09:39:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596213544; cv=none; d=google.com; s=arc-20160816; b=TGwHdyH9WBIojyWZlgQn6g+B+6xWW7Vnm0OUy3KPu2qWQ+y8JvG9Xx30sNOBtmOQt7 rDNRipLB1d95EcPiC0ARFx67DMOO3pKKtP+ZJ3IBF1wBY1CmgzEzsMGC6QJLNNh5pB7H AhTIX3ZUoM6qyAYSixFK80H48zouH1xgGX/Q2w3zaOa+AnUVwIJDT3Q9LE7FhE/C5mNS wA0gQ9wH6KuiSDgQkgKh69mk7VDB+Uk1lvi3DuoQWGRfmNKQ3SGip19EAhuepJVLbXvL yyeQSkqL0VcdQUQM564baWBhbTALKt1V0DVWTaANZ7UTiztX+YFp8Vhh3WZ3bhUXQT50 Vlag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=43NN3FBqwXjvMFcKJYOHgJ5BfI9wVCiL7/PeDGV1ITI=; b=ACpWTdErPZcAeyHt2ztSUScOivSwmDchZPBCVTiez/4fKwJ5Z7hf8/PVwod2UmWJZy Na6kC1tAoOfwhjhUb+H71uIgrd6b9X/ssASkURzFmIHEsaUQzj1piJregrl1sPr4YxnS CeLyxSQuHlHkvQjAtERj24EPT4RCVuazHYAO+Vi0LLcS9IKq89WMOfTrpIsVaThTD0/Q WMr2WJwOeGQAnH1st+BmgWCgo6ce5mbEZCQ6j9Zbrl8TbAcUuM7ttlnp7ctJiU70QZh7 QfZciKYj4rGq4DAFraK2B7M4EU0rx17UjmwnRNpcNWJS6P0oCQwx12aFyJ7CDMTsXX8H QFtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hYH33ig4; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d27si5480887ejb.176.2020.07.31.09.38.41; Fri, 31 Jul 2020 09:39:04 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hYH33ig4; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732627AbgGaQf6 (ORCPT + 99 others); Fri, 31 Jul 2020 12:35:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731565AbgGaQf5 (ORCPT ); Fri, 31 Jul 2020 12:35:57 -0400 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB0D7C061574 for ; Fri, 31 Jul 2020 09:35:57 -0700 (PDT) Received: by mail-qt1-x842.google.com with SMTP id k18so23357111qtm.10 for ; Fri, 31 Jul 2020 09:35:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=43NN3FBqwXjvMFcKJYOHgJ5BfI9wVCiL7/PeDGV1ITI=; b=hYH33ig4F61VhNRJo93K0iV18Je3rxozZKCKaxxQid7dvrdF277R5BRMc7c3OcqLYb 8V+5HR4SCFRGSbszr4hWsXoKKJA0ZhAPznQUWv5mx051zzqZzAEdMfJKTdUbnHeI6sPs 3jrSzoYWfsyhYHJYmGhpvtD3LRPF9tbtF0ZCQJP8hFVA7qLmNZFHM3LRgyaApSRqZ1It D218Ujnyt6RqsGuBFju2hHAEJWlJuXQ4Wq/nC1apupU9ZVd17Tj+d21Qc0eFrX2KNj3a c0dyO8xDhLSilcmQnPm8453LCA7P+Q9W4dhC6G4O81MAE+q200n2PK5oiu0Mw6KOxC82 Z+yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=43NN3FBqwXjvMFcKJYOHgJ5BfI9wVCiL7/PeDGV1ITI=; b=afGVyPkO/FOxoGEfEEAs+TgJexVfkCv+T0vtgw2zunADEDmFdgpevRXZ+mKHNJLeVg xZkc6xkT8u8pB5RRhJmBgivZp2ItDx6JnF+MTEiRytu+Kekzfvj9F4HLtMFqLD0e2hWE g+1eyVcVnf/IjsmXNRlJwcGBCh90CUMAVcXP4TfEQGfM4VGoPNpUxkk8pPb8Je3JZIdD jQ2b+yaQdKkcLWaRHNwIpKPWIQPolPEN5dcDNDpxmus1wqRgg7q3ATX7CTDR8XPvCRvv OBHArW5kCHbJVeoEAOmuWTBz8TQu41GnB5ZlTO2Suf5wFn4Oay0fMVjAkHHL5OKYeSA3 9Ccw== X-Gm-Message-State: AOAM532rIhpLhrIZw1u8/wA5ZG98mKUfAvK6ZjbQbTSxMn1y9H6QUHUO 8q6Mf6gvbGLSTyUp1Uyy0DI= X-Received: by 2002:ac8:306a:: with SMTP id g39mr4520427qte.259.1596213356949; Fri, 31 Jul 2020 09:35:56 -0700 (PDT) Received: from ?IPv6:2601:284:8202:10b0:c147:b41e:be5e:8b7a? ([2601:284:8202:10b0:c147:b41e:be5e:8b7a]) by smtp.googlemail.com with ESMTPSA id x198sm9954334qka.37.2020.07.31.09.35.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 31 Jul 2020 09:35:56 -0700 (PDT) Subject: Re: [PATCH 2/6] perf tools: Store clock references for -k/--clockid option To: Jiri Olsa , Alexey Budankov Cc: Jiri Olsa , Arnaldo Carvalho de Melo , lkml , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Michael Petlan , Ian Rogers , Andi Kleen , =?UTF-8?Q?Genevi=c3=a8ve_Bastien?= , Wang Nan , Jeremie Galarneau References: <20200730213950.1503773-1-jolsa@kernel.org> <20200730213950.1503773-3-jolsa@kernel.org> <9be7eb7b-4f73-84cc-95e9-e65101b30819@linux.intel.com> <20200731161519.GB4296@krava> From: David Ahern Message-ID: Date: Fri, 31 Jul 2020 10:35:54 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200731161519.GB4296@krava> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/31/20 10:15 AM, Jiri Olsa wrote: >> It might also want to be implemented in a loop and iteration with minimal >> time delta is chosen to improve synchronization accuracy and also mitigate >> possible context switches between gettimeofday() and clock_gettime() calls. > right, we could make this more accurate.. I'll post some follow up > change with that If it is handled through vdso (e.g., x86) both calls should be very fast with no context switches and the margin of error is well less than the usec resolution in the output.