From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756341AbbGGHeh (ORCPT ); Tue, 7 Jul 2015 03:34:37 -0400 Received: from mga09.intel.com ([134.134.136.24]:27794 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752637AbbGGHea (ORCPT ); Tue, 7 Jul 2015 03:34:30 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,421,1432623600"; d="scan'208";a="759671940" Message-ID: <559B8070.1030102@intel.com> Date: Tue, 07 Jul 2015 10:32:00 +0300 From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: David Ahern CC: Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org, Jiri Olsa , Namhyung Kim Subject: Re: [PATCH] perf record: Let user have timestamps with per-thread recording References: <1436183461-1918-1-git-send-email-adrian.hunter@intel.com> <559A9F41.4050705@gmail.com> In-Reply-To: <559A9F41.4050705@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/07/15 18:31, David Ahern wrote: > On 7/6/15 5:51 AM, Adrian Hunter wrote: >> diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c >> index 6be3c01ff6f8..ec98e5b4e14e 100644 >> --- a/tools/perf/util/evsel.c >> +++ b/tools/perf/util/evsel.c >> @@ -707,7 +707,8 @@ void perf_evsel__config(struct perf_evsel *evsel, >> struct record_opts *opts) >> */ >> if (opts->sample_time && >> (!perf_missing_features.sample_id_all && >> - (!opts->no_inherit || target__has_cpu(&opts->target) || per_cpu))) >> + (!opts->no_inherit || target__has_cpu(&opts->target) || per_cpu || >> + opts->sample_time_set))) >> perf_evsel__set_sample_bit(evsel, TIME); >> >> if (opts->raw_samples && !evsel->no_aux_samples) { >> > > Why is the sample_time_set even needed? If a user or a command asks for > sample time the bit should be set. This seems crazy that underlying code is > ignoring the request. sample_time defaults to true, so there is no way to know if the user set it without sample_time_set.