Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp978438pxb; Fri, 22 Apr 2022 15:48:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5tfH1bqXgDk6h5ZHO4jPiNXj8duoNZ8w3/dduL/vwX+ORuz3LIlYHdBX3sokP1PoV4h8M X-Received: by 2002:a17:902:b213:b0:158:d44d:cad4 with SMTP id t19-20020a170902b21300b00158d44dcad4mr6590709plr.45.1650667712862; Fri, 22 Apr 2022 15:48:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650667712; cv=none; d=google.com; s=arc-20160816; b=YoQEvUvqRWdvbxuIWbQbP3eLiYO6v5RTuZE4OW7/4Dv/Kgas8UaHbkOXRrzmgQbdCm OctfUsWdyGcXRZ1um9/r3FZcyb6kC/2enz77awM/uOpOw1sGyVgF5w/jilq6nWQeMvVL F+P4RQTMaKn0WMVsaOMKaVactRsoV7oz43C0pD2CuW+HcFkkRk49NpKeuYAbjUDN/ssT 7/6jV4zl8OgryEIx7G/OORF/d8vAbK/CMcTLOBdlvz21bJCxOXkriK7rUtdlVMJir6P/ xhXgxQkS7RSMDrG5rO03jIm8tMA4nZ8dtXZXmMwrM9Qae7MoyitdxIVf+5R++SPkNFKp Bq8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=kd+SD3Sx17RFXp9jtZwIq5D0MapbSFKTj/H+3N8HL80=; b=v9HCV94z3XsIj60C71xqsg2rpRsA/lm3uZN5T/cWjsVYGEjUzGhMjQM0hMO2pKT4jd UcYJLAt4M5cMMGg3to0IFddJe0Fhhg3dAZSCs79fi47lmOenWdPPLgcmhfRCwt1na2k9 Gm7azuoVVu/G5nhbF8gAhqCXdoatyYl1X9wlqDwvOfTd6NsdiLK25GH3p/rnNHZqp6BO WpPBnYCISR2KsNHZsdtscPI52q5RMF/OE1hY1pBGuoZJEUIRgnpwS8SBXYl5ALYDy7C9 tQx4t9DyJu5SKALE0WEZHS+iFcFRYWrLHd1uZPtb2eI9q0P0LQYqBGBmJ+SXChUyCQAp 9+vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fi6U9+ID; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id nv18-20020a17090b1b5200b001cb85d10726si14905211pjb.77.2022.04.22.15.48.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 15:48:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fi6U9+ID; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2F9541C4EAE; Fri, 22 Apr 2022 13:37:24 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230144AbiDVTfe (ORCPT + 99 others); Fri, 22 Apr 2022 15:35:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbiDVTf3 (ORCPT ); Fri, 22 Apr 2022 15:35:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A5A72715FB; Fri, 22 Apr 2022 12:13:23 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BAC5C61772; Fri, 22 Apr 2022 19:01:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4CA2C385A0; Fri, 22 Apr 2022 19:01:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650654077; bh=IppT2R5TmZBgoejAuAjih5UgAJJvNanNsyybwMJzd5I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fi6U9+IDQcTBxm+CXXQsZtee8+hWCRJ2lBwOi/utPqHiwVoNC3jg+eFCDsDJh7SrC I5rz7bKmFt8Fp/ieoYCYEMpUeWMPAWcgWGCdO48gckmz/EXAFO/AwaZvv9Pe1qYU23 in0x9QlG2A198XJKZY5G9pbZWIHWCbv4727wa6+LITX0p0VWkFD2UhMFomRuu+cq87 aIlADhdG9f1py1ctOiM1BYNW3ZaW08d8nWZ0bINTh02KuaLqj1cgqZ63So9WOaHwDe 1rUq0ZLBS7AC5YHvDMWMxAgTaw9IiToqwv6P0BpCXKOueNrvDHhk2yhXOohgxkTCQu GovpyAwYd13DQ== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id AA394400B1; Fri, 22 Apr 2022 16:01:13 -0300 (-03) Date: Fri, 22 Apr 2022 16:01:13 -0300 From: Arnaldo Carvalho de Melo To: Matt Turner Cc: Arnaldo Carvalho de Melo , linux-perf-users@vger.kernel.org, LKML , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Jelle van der Waa Subject: Re: [PATCH] tools: port perf ui from GTK 2 to GTK 3 Message-ID: References: <20220415050003.3257645-1-mattst88@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Apr 21, 2022 at 02:02:49PM -0700, Matt Turner escreveu: > On Wed, Apr 20, 2022 at 10:08 AM Arnaldo Carvalho de Melo > wrote: > > > > Em Thu, Apr 14, 2022 at 10:00:03PM -0700, Matt Turner escreveu: > > > From: Jelle van der Waa > > > > > > GTK 2 is a legacy API and the newer version is GTK 3 which changes a few > > > API functions. gtk_tree_view_set_rules_hint is no longer required since > > > theme's are now responsible to handle this, gtk_vbox_new is deprecated > > > and replaced by passing the orientation to gtk_box_new. Apart from these > > > changes the accessing of the screen changed in GTK which requires using > > > new functions for getting geometry. Lastly the GTK_STOCK_OK define is > > > deprecated in GTK 3. > > > > > > Signed-off-by: Jelle van der Waa > > > Signed-off-by: Matt Turner > > > --- > > > Originally sent in 2019. I've rebased it and given it a test. > > > > > > One problem I've noticed is that C++ symbol names are often broken. > > > E.g.: > > > > > > (perf:3254940): Gtk-WARNING **: 21:47:46.663: Failed to set text from > > > markup due to error parsing markup: Error on line 1 char 95: > > > “std::char_traits > > > > > Presumably we need to call g_markup_escape_text() somewhere, but I > > > struggled to find the right place. > > > > > > Without the patch, the GTK-2 version repeatedly segfaults, so this is an > > > improvement regardless. > > > > I'm trying to test build this but failing: > > > > 1. uninstalled gtk2-devel, which removed several other packages > > > > 2. installed gtk3-devel, which installed several other packages > > > > 3.: > > > > Auto-detecting system features: > > ... dwarf: [ on ] > > ... dwarf_getlocations: [ on ] > > ... glibc: [ on ] > > ... gtk3: [ OFF ] > > ... libbfd: [ on ] > > ... libbfd-buildid: [ on ] > > > > Looking at how that OFF is deduced: > > > > ⬢[acme@toolbox perf]$ cat /tmp/build/perf/feature/test- > > Display all 150 possibilities? (y or n) > > ⬢[acme@toolbox perf]$ cat /tmp/build/perf/feature/test-all.make.output > > In file included from test-all.c:74: > > test-gtk3.c:3:10: fatal error: gtk/gtk.h: No such file or directory > > 3 | #include > > | ^~~~~~~~~~~ > > compilation terminated. > > ⬢[acme@toolbox perf]$ > > > > ⬢[acme@toolbox perf]$ find /usr/include -name gtk.h > > /usr/include/gtk-3.0/gtk/gtk.h > > ⬢[acme@toolbox perf]$ rpm -qf /usr/include/gtk-3.0/gtk/gtk.h > > gtk3-devel-3.24.31-2.fc35.x86_64 > > ⬢[acme@toolbox perf]$ > > > > And that pkg-config line produces: > > > > ⬢[acme@toolbox perf]$ pkg-config --libs --cflags gtk+-3.0 > > -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/libxml2 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cloudproviders -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/at-spi-2.0 -pthread -lgtk-3 -lgdk-3 -lz -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 > > ⬢[acme@toolbox perf]$ > > > > I'm testing this on fedora 35 silverblue, in a perf build container: > > > > ⬢[acme@toolbox perf]$ rpm -qa | grep gtk > > gtk-update-icon-cache-3.24.31-2.fc35.x86_64 > > libcanberra-gtk3-0.30-27.fc35.x86_64 > > gtk3-3.24.31-2.fc35.x86_64 > > libcanberra-gtk2-0.30-27.fc35.x86_64 > > gtk2-2.24.33-7.fc35.x86_64 > > gtk3-devel-3.24.31-2.fc35.x86_64 > > ⬢[acme@toolbox perf]$ > > > > Ideas? > > Just to be clear, are you building with 'GTK3=1 make'? Since commit No, I'm not, as I first test without enabling it, and in that case test-all.c is now failing, since these lines were added there: diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c index 5ffafb967b6e..5ec093498cfc 100644 --- a/tools/build/feature/test-all.c +++ b/tools/build/feature/test-all.c @@ -70,6 +70,14 @@ # include "test-libslang.c" #undef main +#define main main_test_gtk3 +# include "test-gtk3.c" +#undef main + +#define main main_test_gtk3_infobar +# include "test-gtk3-infobar.c" +#undef main + #define main main_test_libbfd # include "test-libbfd.c" #undef main @@ -187,6 +195,8 @@ int main(int argc, char *argv[]) main_test_libelf_getshdrstrndx(); main_test_libunwind(); main_test_libslang(); + main_test_gtk3(argc, argv); + main_test_gtk3_infobar(argc, argv); main_test_libbfd(); main_test_libbfd_buildid(); main_test_backtrace(); diff --git a/tools/build/feature/test-gtk2-infobar.c b/tools/build/feature/test-gtk3-infobar.c ------------ test-all.c is what we expect to be enabled in most places, i.e. that it will build successfully and we then don't have to test the features one by one, speeding up the process. So please don't add those entries in tools/build/feature/test-all.c. After the common case is tested and doesn't regress, we can move on to test with explicitely enabling the GTK code, ok? - Arnaldo > 4751bddd3f98 ("perf tools: Make GTK2 support opt-in") it's required to > enable GTK support explicitly. (IMO, leaving it disabled by default > makes sense to me, given some of the problems)