From patchwork Thu Mar 12 19:56:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Olsa X-Patchwork-Id: 222618 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2DE3C1975A for ; Thu, 12 Mar 2020 19:57:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 75CD02072F for ; Thu, 12 Mar 2020 19:57:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584043053; bh=qKe0OWZWXGY78xKzR20X97tq0N+9+WtaSp9ZVfEY6iU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Ib4ZhXF3nprtHko73C9BjOcfPOOlgA/Z16JNWI58vWbQN1sB/9QlF/iNvaijESSOp VFFbH/tUP2RpbLK3FVOSTb1Crgboba33vzFqvyBa40baNnDqsxfocViIGLcRybM+19 anvXh9EL1zvDpn2ETMyixBvN6u6YJ0LMVMXAv6I0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727088AbgCLT5c convert rfc822-to-8bit (ORCPT ); Thu, 12 Mar 2020 15:57:32 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:31326 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727070AbgCLT5c (ORCPT ); Thu, 12 Mar 2020 15:57:32 -0400 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-23-IxvI6rggMmeLaU-M9WQ-LA-1; Thu, 12 Mar 2020 15:57:27 -0400 X-MC-Unique: IxvI6rggMmeLaU-M9WQ-LA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 634F1801E6C; Thu, 12 Mar 2020 19:57:25 +0000 (UTC) Received: from krava.redhat.com (ovpn-204-40.brq.redhat.com [10.40.204.40]) by smtp.corp.redhat.com (Postfix) with ESMTP id 76EEF5D9C5; Thu, 12 Mar 2020 19:57:21 +0000 (UTC) From: Jiri Olsa To: Alexei Starovoitov , Daniel Borkmann Cc: Arnaldo Carvalho de Melo , Song Liu , netdev@vger.kernel.org, bpf@vger.kernel.org, Andrii Nakryiko , Yonghong Song , Martin KaFai Lau , Jakub Kicinski , David Miller , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , John Fastabend , Jesper Dangaard Brouer , Song Liu Subject: [PATCH 14/15] perf tools: Set ksymbol dso as loaded on arrival Date: Thu, 12 Mar 2020 20:56:09 +0100 Message-Id: <20200312195610.346362-15-jolsa@kernel.org> In-Reply-To: <20200312195610.346362-1-jolsa@kernel.org> References: <20200312195610.346362-1-jolsa@kernel.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: kernel.org Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org There's no special load action for ksymbol data on map__load/dso__load action, where the kernel is getting loaded. It only gets confused with kernel kallsyms/vmlinux load for bpf object, which fails and could mess up with the map. Disabling any further load of the map for ksymbol related dso/map. Acked-by: Arnaldo Carvalho de Melo Acked-by: Song Liu Signed-off-by: Jiri Olsa --- tools/perf/util/machine.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index fb5c2cd44d30..463ada5117f8 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c @@ -742,6 +742,7 @@ static int machine__process_ksymbol_register(struct machine *machine, map->start = event->ksymbol.addr; map->end = map->start + event->ksymbol.len; maps__insert(&machine->kmaps, map); + dso__set_loaded(dso); } sym = symbol__new(map->map_ip(map, map->start),