Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2828523ybg; Thu, 24 Oct 2019 16:09:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqzG4h30EHTOqnTtjs66l9kukRLvF0ncGBG0V8JkfrGNPVDnaKHOwHpyb+CanNI0hw6LxF+K X-Received: by 2002:a17:906:3010:: with SMTP id 16mr638679ejz.74.1571958558895; Thu, 24 Oct 2019 16:09:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571958558; cv=none; d=google.com; s=arc-20160816; b=QQNWg3IzAvzL5ppNbglcejNO0BqWqATcYa1G8oiy6GX2PzAthyZ99/l/Nw5t451keg hjDhjVdRpGmVRcx/w0MtEQOBn84UOeKGN58Q4ZkwkzU41ncyH4hLD0HhAeRXb1qgV5zJ K5lD2WXfn+96YQz25dRbFrcAWoSiLz8rfJjwTKr4lRA309bgOJgFGvDGpQCX4Snttv8I ca4CWSNmjlk4xtnGInSgvnc8+jRwJjKsIE7tezOxazxCgw7Rtk1Ux0jPvlj2KBQFLq3l JOR421SGE8gKGWWM51jjBuV3U0yg/NmqyqwvqSRwY34XnwvYGrMEpy5COIOqQt2OyHHe LZ8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:user-agent:in-reply-to:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Bo34zTC4JQ2tsdZbu5ywIVsmasMMdr8/hfrAnn7U7ck=; b=OWojQB1EgeAhcnQyphQMuZ2skYzDJ3uUxst2l/S/I4Ef4z/SJtpxIQVmKMNkNfnpja Z89BMJBlG1k8sb1Z5fw0+UVHA+r+GXR6UG8AoaGe/R2FmpX7TtqeHYphpVZb7J1AGisO 6ePbO627guAn0sKm0ajKO94PvRFcBt/Eg1Jz3nOcAlOwIPoUawMMsIWkvBI/pPi9V6F5 G33onnaWykshaqTz0PQExMlI1QCGRGcpUCWuFPuyoxdJd4Im9xhwIw2mH8IwdKw6CHXd cnL71oLIv1dlqP36BGLtWUhqqsYq+LbVTgw3tCZnUAJcC/TROIcnTiSi4t9iI7sDzWkb GpOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bUDsC0Ia; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h7si131355ejp.203.2019.10.24.16.08.54; Thu, 24 Oct 2019 16:09:18 -0700 (PDT) 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=@redhat.com header.s=mimecast20190719 header.b=bUDsC0Ia; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438146AbfJXIYP (ORCPT + 99 others); Thu, 24 Oct 2019 04:24:15 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:42083 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725947AbfJXIYP (ORCPT ); Thu, 24 Oct 2019 04:24:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571905453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Bo34zTC4JQ2tsdZbu5ywIVsmasMMdr8/hfrAnn7U7ck=; b=bUDsC0IamBLXKjTWG6aPzv99/jGGFLmGWRG84jXjK8Mwztg98u8dq8X+kUBzAnx7oiM315 IJmgHsCyOydXzFSVZLlTPjnG2hqhjnNB1zjCa35axoQ/XYJPsVWfNTH/bTiG1BphLGStBY kVua7FjY6znJ7sCOgcEXWVyYLKmeGew= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-300-kCkzpfhJN_2YbO2fmoU_qQ-1; Thu, 24 Oct 2019 04:24:07 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CA8FB1800DCA; Thu, 24 Oct 2019 08:24:05 +0000 (UTC) Received: from krava (unknown [10.43.17.61]) by smtp.corp.redhat.com (Postfix) with SMTP id 1174D600C4; Thu, 24 Oct 2019 08:24:01 +0000 (UTC) Date: Thu, 24 Oct 2019 10:24:01 +0200 From: Jiri Olsa To: Igor Lubashev Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Jiri Olsa , Alexander Shishkin , Namhyung Kim , Mark Rutland , Linux Kernel Mailing List Subject: Re: [PATCH 0/3] perf: Allow running without stdin Message-ID: <20191024082401.GA13378@krava> References: <1571795693-23558-1-git-send-email-ilubashe@akamai.com> MIME-Version: 1.0 In-Reply-To: <1571795693-23558-1-git-send-email-ilubashe@akamai.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: kCkzpfhJN_2YbO2fmoU_qQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 22, 2019 at 09:54:50PM -0400, Igor Lubashev wrote: > This series allows perf to run in batch mode with stdin closed. > This is arguably a bug fix for code that runs with --stdio option and doe= s not > check for EOF return code from getc(). >=20 > This series makes the following work as expected: >=20 > $ perf top --stdio < /dev/null > $ perf kvm top --stdio < /dev/null >=20 > Patches: > 01: perf top: Allow running without stdin > Make "perf top --stdio" handle EOF from stdin correctly. > There is one getc() that does not handle EOF explicitly, since its re= turn > value is checked against a list of known characters, and the main loo= p in > display_thread() will handle the EOF on the next iteration. >=20 > 02: perf kvm: Allow running without stdin > Make "perf kvm --stdio" handle EOF from stdin correctly. >=20 > 03: perf kvm: Use evlist layer api when possible > This is a simple fix for a needless layering violation. >=20 > Igor Lubashev (3): > perf top: Allow running without stdin > perf kvm: Allow running without stdin > perf kvm: Use evlist layer api when possible Acked-by: Jiri Olsa thanks, jirka >=20 > tools/perf/builtin-kvm.c | 35 +++++++++++++++++++++-------------- > tools/perf/builtin-top.c | 10 ++++++++-- > 2 files changed, 29 insertions(+), 16 deletions(-) >=20 > --=20 > 2.7.4 >=20