From patchwork Fri Jan 12 23:12:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 124385 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2602504qgn; Fri, 12 Jan 2018 15:12:30 -0800 (PST) X-Google-Smtp-Source: ACJfBoucfMZ/pUcTcytFSfTSOGFUNPs6MRo6PqdkX8yGCgjaV7AbWwHNBd9n5euZfO4lDCx7eHEP X-Received: by 10.159.216.149 with SMTP id s21mr21755113plp.297.1515798750392; Fri, 12 Jan 2018 15:12:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515798750; cv=none; d=google.com; s=arc-20160816; b=Eragd+3/rzuEtoMmLBlVEr3gfwDumq5GFyJQWGf3WhcqRy8+edEPUFhmF8/TYhqM2w CcCEGQNz533yit59vauSZrs3TvKsNzzJofHez8RQ7SfGJKgxnG50+PErxJQv3bc7wIm9 bYD5THC547ef7lsA00f21Ign92u5kIPe6EDskNKkv5czpssoh90Z9ntYTMxOGx9Eb8n6 VSl5HtlowQua0EYB6h/UdxtrXha5wvJNUdwRMgEOLaRhupdOwSt9+q2D1njr+NhgbDVn mK4os7aEFsBfETkgC/lyo2GQj0firrks1/tpaNgZSEEdR3pauf/yTdedofD8XEwq3Wzy Soqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=jtAAQfzW6oyoq98BIRbty/Tn4mnVi7zesDm7RxYZO5c=; b=saXhnf0XVUvA8do6RHQA983071YJ4vj4RZ8Mt8QcI46giqLF67orG8lotIj8ZWCAuP MtZSgqLKAhKE9NT3LCdfzVtHCRsLkxfxk6INRFEHzuiRqJ6gBjjhjw9WZqMxPdIIJ46o D9co03Da8SsZBiuHQ5JvJH24KrOe9XWLLG+/B0bzACL2mjdZAxaAhxlHgVbpOcgI7zZF R2gkcC7fBttzJSLoqeoj5HGEuEXDAd2xNb+ayRDW0FmQ/0rBN3/7/XjM8a5Svc/ybRij d9OqYZmKt1EVzFrWQtnYv4fiPM3Atidx+NECgPNoXBa8Qjhs3NXVwBVnP5rII/bT8dPM jo1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cKgbZ5Vg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h1si14213389pgs.693.2018.01.12.15.12.30; Fri, 12 Jan 2018 15:12:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cKgbZ5Vg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965407AbeALXM2 (ORCPT + 28 others); Fri, 12 Jan 2018 18:12:28 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:34905 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965260AbeALXM1 (ORCPT ); Fri, 12 Jan 2018 18:12:27 -0500 Received: by mail-io0-f196.google.com with SMTP id 14so7556601iou.2 for ; Fri, 12 Jan 2018 15:12:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=jtAAQfzW6oyoq98BIRbty/Tn4mnVi7zesDm7RxYZO5c=; b=cKgbZ5VgqOomxn7MV9D4mREE015XWVKzbyYcfWOm9Sd3Yi0g0jw28xQzl5MsGoUncC gkF0+7Hdt7NyLSofS0ftDylAQlsjzCtjq+zh5KZ0xU+NdABmfGolNB31/hEPLN2EYCtq gdNjDdLAJSvgrMbATiBJ3SFpxxauYz38GetwI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=jtAAQfzW6oyoq98BIRbty/Tn4mnVi7zesDm7RxYZO5c=; b=TsAUFhd03jlRNbubjbVhBP+UNc6pibJnzZ3TrW4A/zWlKxw619pYLK7bHMyHXj3lfz mx7adURF8Z8z2T28PP1y28vq4h4M4Ds5gj6dCZnzBjo8IycPvRuy9+LbQX+5nCvKjZIF b7KueL/gfcPKKgyoKDnG47aN//P45RrONrD04vCxWtTBGORadHG2krfb/F+3iYYaHkCT njMhyQ0uo3qnDdcwkU/NfaQ6CnUkCClD5tl8gKAvHlj1qna7NdWS8vhMJY3mb2NxmN2O SZXM4R03DWxiH4dwyJJtv7PU7ZM6cz+YJmk2OSH9xaeVG4bHA4uGqCd6ZK9wJDqceOJ3 KwEQ== X-Gm-Message-State: AKwxytcGLyxQxMCvqHoGfJgrO5fSPlT5U7bCeFwAP3CUU9usy6WXwal+ LFqTkNm5w63Hxvr5TQ8SLf2B/g== X-Received: by 10.107.1.3 with SMTP id 3mr212290iob.221.1515798746428; Fri, 12 Jan 2018 15:12:26 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id o39sm13935071ioi.1.2018.01.12.15.12.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Jan 2018 15:12:25 -0800 (PST) From: Mathieu Poirier To: acme@kernel.org Cc: peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, yao.jin@linux.intel.com, linux-kernel@vger.kernel.org Subject: [PATCH 0/1] perf util: Do not reuse target->per_thread flag Date: Fri, 12 Jan 2018 16:12:22 -0700 Message-Id: <1515798743-2541-1-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnaldo, Here is another stab at addressing the side effect introduced by commit ("73c0ca1eee3d perf thread_map: Enumerate all threads from /proc"). I have decided to add another variable to struct target, which keep things simple and doesn't touch the core. Another solution could have been to make target->per_thread an enumaration with values PER_THREAD and ALL_THREAD, something that could be switched on in function thread_map__new_str(). I opted for the first option as it makes the code easier to understand. Let me know what you prefer or get back to me with a better solution if you see one. Thanks, Mathieu Mathieu Poirier (1): perf util: Do not reuse target->per_thread flag tools/perf/builtin-stat.c | 2 +- tools/perf/util/evlist.c | 2 +- tools/perf/util/target.h | 1 + tools/perf/util/thread_map.c | 4 ++-- tools/perf/util/thread_map.h | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) -- 2.7.4