From patchwork Thu Oct 21 11:41:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Olsa X-Patchwork-Id: 12574741 X-Patchwork-Delegate: bpf@iogearbox.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9D3AC433FE for ; Thu, 21 Oct 2021 11:41:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9ADAF611BD for ; Thu, 21 Oct 2021 11:41:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230359AbhJULn6 (ORCPT ); Thu, 21 Oct 2021 07:43:58 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:45910 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230342AbhJULn5 (ORCPT ); Thu, 21 Oct 2021 07:43:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634816501; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FRy9bwvZsJvWv4Af9Z5HsgohV/baKvxzAPxWjKJBPXI=; b=FClAsCVq3+KP/HYXDxgBYKpwhEOQfv6qwRZza/q2LenDk/xc/tAjHzgJb0LPpleUwy/OoQ DFnUTPFSvJEXxFOIeKOKz+P3d6746s0Cy3ljD5zYiu7FqU2PdWiOtaqHbsf2aZiSSL7pwr zFu6yIzHdYDF9M6qADYf9pON0sX4Wak= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-168-nD2ekNrhPX-PyJjKRLnOYw-1; Thu, 21 Oct 2021 07:41:40 -0400 X-MC-Unique: nD2ekNrhPX-PyJjKRLnOYw-1 Received: by mail-ed1-f72.google.com with SMTP id h19-20020aa7de13000000b003db6ad5245bso27920edv.9 for ; Thu, 21 Oct 2021 04:41:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FRy9bwvZsJvWv4Af9Z5HsgohV/baKvxzAPxWjKJBPXI=; b=3Hhk9oRYMK77TDIxiIZ1hJB3rCU6v9FGwOXJ7+DRLrNKcgwIHM73z/nhVk5mkEaPhx WZNFyltO0uLHMdjwmhOL+Ms2S7eJgX+BheklwHPqaso6t+ACTeYQ6ZMTTumB3IrvOgBk E3QopBQWhtJnZTTuxUJzLnHP2GVDVWN8urfGiMd1AQc2O53SuPmfvGJ3apcSQ6FvhguY PMOWpt3Q++wb+XC2NSvnIe9e5cHqolGDqETMueumXpqTgqBPQ3aPpyKwntjPGHj2yYRn tBMEmYzbbYUmsvjQcg/1/FeCEehHbsAgNOglgQjA/ZiDFnTKszMEcBhOQ9Wbc3aOQ09K 0sVQ== X-Gm-Message-State: AOAM531UDodfjcv4D4AtN32IFOkDNajoLol1UMm82aueGNDYQFQ/6nCW nq2FZ6HrJufufyIx/HbRuyUZ7SbgAorFeMBYzVclDTveMUoXQXkgIn/AZhgGpDAXODFFGaPHaa6 ye4VdGhSMCO4Mg+fT X-Received: by 2002:a17:906:c20e:: with SMTP id d14mr6766027ejz.207.1634816499338; Thu, 21 Oct 2021 04:41:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCiK8vnQe735HJG2AsvUb8pzqXp9/UxXfuLbE+ngwtWOz6xlrSMSW1U8CS+XtEkWHYTx0ssg== X-Received: by 2002:a17:906:c20e:: with SMTP id d14mr6766007ejz.207.1634816499159; Thu, 21 Oct 2021 04:41:39 -0700 (PDT) Received: from krava.cust.in.nbox.cz ([83.240.63.48]) by smtp.gmail.com with ESMTPSA id j3sm2373941ejy.65.2021.10.21.04.41.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Oct 2021 04:41:38 -0700 (PDT) From: Jiri Olsa X-Google-Original-From: Jiri Olsa To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh Subject: [PATCH bpf-next 1/3] selftests/bpf: Fix perf_buffer test on system with offline cpus Date: Thu, 21 Oct 2021 13:41:30 +0200 Message-Id: <20211021114132.8196-2-jolsa@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211021114132.8196-1-jolsa@kernel.org> References: <20211021114132.8196-1-jolsa@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: bpf@iogearbox.net The perf_buffer fails on system with offline cpus: # test_progs -t perf_buffer test_perf_buffer:PASS:nr_cpus 0 nsec test_perf_buffer:PASS:nr_on_cpus 0 nsec test_perf_buffer:PASS:skel_load 0 nsec test_perf_buffer:PASS:attach_kprobe 0 nsec test_perf_buffer:PASS:perf_buf__new 0 nsec test_perf_buffer:PASS:epoll_fd 0 nsec skipping offline CPU #24 skipping offline CPU #25 skipping offline CPU #26 skipping offline CPU #27 skipping offline CPU #28 skipping offline CPU #29 skipping offline CPU #30 skipping offline CPU #31 test_perf_buffer:PASS:perf_buffer__poll 0 nsec test_perf_buffer:PASS:seen_cpu_cnt 0 nsec test_perf_buffer:FAIL:buf_cnt got 24, expected 32 Summary: 0/0 PASSED, 0 SKIPPED, 1 FAILED Changing the test to check online cpus instead of possible. Signed-off-by: Jiri Olsa --- tools/testing/selftests/bpf/prog_tests/perf_buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/bpf/prog_tests/perf_buffer.c b/tools/testing/selftests/bpf/prog_tests/perf_buffer.c index 6979aff4aab2..877600392851 100644 --- a/tools/testing/selftests/bpf/prog_tests/perf_buffer.c +++ b/tools/testing/selftests/bpf/prog_tests/perf_buffer.c @@ -107,8 +107,8 @@ void serial_test_perf_buffer(void) "expect %d, seen %d\n", nr_on_cpus, CPU_COUNT(&cpu_seen))) goto out_free_pb; - if (CHECK(perf_buffer__buffer_cnt(pb) != nr_cpus, "buf_cnt", - "got %zu, expected %d\n", perf_buffer__buffer_cnt(pb), nr_cpus)) + if (CHECK(perf_buffer__buffer_cnt(pb) != nr_on_cpus, "buf_cnt", + "got %zu, expected %d\n", perf_buffer__buffer_cnt(pb), nr_on_cpus)) goto out_close; for (i = 0; i < nr_cpus; i++) { From patchwork Thu Oct 21 11:41:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Olsa X-Patchwork-Id: 12574743 X-Patchwork-Delegate: bpf@iogearbox.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 019EEC433FE for ; Thu, 21 Oct 2021 11:41:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DD4F8611BD for ; Thu, 21 Oct 2021 11:41:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230361AbhJULoE (ORCPT ); Thu, 21 Oct 2021 07:44:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:26119 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229765AbhJULoD (ORCPT ); Thu, 21 Oct 2021 07:44:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634816507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4VzWi77FQT/0Gb/rWzZ26Ywd1gYA6zkvj3gNqaGZ5jw=; b=DJK0DPlvS3axVnolr/3zMiaSGcXjl1RrR9OJfQDuaUdjAwITML3kmSGMBc59x6LZROCjvt HIEllICgoD5oN9O38CxIJXGOKpW2J9z7VARdkrygJ9rob/WPE1t80BTINZNsq/32vU7xoH yROHy/+bhbBwlBe3ceYDOLQFPekKi10= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-512-z_sOp0xJNyy5Q1cu23pJkg-1; Thu, 21 Oct 2021 07:41:46 -0400 X-MC-Unique: z_sOp0xJNyy5Q1cu23pJkg-1 Received: by mail-ed1-f70.google.com with SMTP id d11-20020a50cd4b000000b003da63711a8aso23938291edj.20 for ; Thu, 21 Oct 2021 04:41:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4VzWi77FQT/0Gb/rWzZ26Ywd1gYA6zkvj3gNqaGZ5jw=; b=QryOBqCvdsh0w1hqSiS1LX0rpmFwpKrxTuYLIb4yz1i1EuVXnRRTQ9bbJ4ovYfeQiz 0ktTQ9WsJp21cEDGjK/nBxsfz3KvjFj5g8L7wt6xk8+yXRrzp1v/+gOHCqb+wyNhPE8Y 0JAMhZpA64iaMbAJT6OLD8YdLnNjM7Vk2y0EeKsLnSKnNvBTLl7pWNAE/HUGRPzQQpVt WF8vQIwp+N9OVUzm4NimnC+o7oD73INlyBtapBxxWWHWA+kiWyLqWX2iqP/4MFg63Rlx uNoy6z6Y9KJt687ykI15pbdV7EgsoTC56vV7pP7LT/foXKQIJa/RdrQSJKKyiti4MmdK ohkQ== X-Gm-Message-State: AOAM53342rNRzxAwiUjGjLdQCitcm0yTbTD4JSe5+Z5QjSaG7gOGYy4/ Q1bja6f9ZDxH3qOgVzDPjGBFHWc37yg3jGl6UHnW+xhrmcf0+eB1jaHJZqaLG7jT4926k3uYgCV VdDLtJTXIRKIy1e7j X-Received: by 2002:a17:907:da4:: with SMTP id go36mr6647967ejc.481.1634816505371; Thu, 21 Oct 2021 04:41:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxfhgxzZghIszbq115tCMVMynSxlyV6bGAGhLjOy2KiQidQEKdtYT2AiyJMPQvvZtUj9KbBQ== X-Received: by 2002:a17:907:da4:: with SMTP id go36mr6647945ejc.481.1634816505217; Thu, 21 Oct 2021 04:41:45 -0700 (PDT) Received: from krava.cust.in.nbox.cz ([83.240.63.48]) by smtp.gmail.com with ESMTPSA id o10sm2725533edj.79.2021.10.21.04.41.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Oct 2021 04:41:44 -0700 (PDT) From: Jiri Olsa X-Google-Original-From: Jiri Olsa To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh Subject: [PATCH bpf-next 2/3] selftests/bpf: Fix possible/online index mismatch in perf_buffer test Date: Thu, 21 Oct 2021 13:41:31 +0200 Message-Id: <20211021114132.8196-3-jolsa@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211021114132.8196-1-jolsa@kernel.org> References: <20211021114132.8196-1-jolsa@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: bpf@iogearbox.net The perf_buffer fails on system with offline cpus: # test_progs -t perf_buffer serial_test_perf_buffer:PASS:nr_cpus 0 nsec serial_test_perf_buffer:PASS:nr_on_cpus 0 nsec serial_test_perf_buffer:PASS:skel_load 0 nsec serial_test_perf_buffer:PASS:attach_kprobe 0 nsec serial_test_perf_buffer:PASS:perf_buf__new 0 nsec serial_test_perf_buffer:PASS:epoll_fd 0 nsec skipping offline CPU #4 serial_test_perf_buffer:PASS:perf_buffer__poll 0 nsec serial_test_perf_buffer:PASS:seen_cpu_cnt 0 nsec serial_test_perf_buffer:PASS:buf_cnt 0 nsec ... serial_test_perf_buffer:PASS:fd_check 0 nsec serial_test_perf_buffer:PASS:drain_buf 0 nsec serial_test_perf_buffer:PASS:consume_buf 0 nsec serial_test_perf_buffer:FAIL:cpu_seen cpu 5 not seen #88 perf_buffer:FAIL Summary: 0/0 PASSED, 0 SKIPPED, 1 FAILED If the offline cpu is from the middle of the possible set, we get mismatch with possible and online cpu buffers. The perf buffer test calls perf_buffer__consume_buffer for all 'possible' cpus, but the library holds only 'online' cpu buffers and perf_buffer__consume_buffer returns them based on index. Adding extra (online) index to keep track of online buffers, we need the original (possible) index to trigger trace on proper cpu. Signed-off-by: Jiri Olsa --- .../testing/selftests/bpf/prog_tests/perf_buffer.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tools/testing/selftests/bpf/prog_tests/perf_buffer.c b/tools/testing/selftests/bpf/prog_tests/perf_buffer.c index 877600392851..0b0cd045979b 100644 --- a/tools/testing/selftests/bpf/prog_tests/perf_buffer.c +++ b/tools/testing/selftests/bpf/prog_tests/perf_buffer.c @@ -45,7 +45,7 @@ int trigger_on_cpu(int cpu) void serial_test_perf_buffer(void) { - int err, on_len, nr_on_cpus = 0, nr_cpus, i; + int err, on_len, nr_on_cpus = 0, nr_cpus, i, j; struct perf_buffer_opts pb_opts = {}; struct test_perf_buffer *skel; cpu_set_t cpu_seen; @@ -111,15 +111,15 @@ void serial_test_perf_buffer(void) "got %zu, expected %d\n", perf_buffer__buffer_cnt(pb), nr_on_cpus)) goto out_close; - for (i = 0; i < nr_cpus; i++) { + for (i = 0, j = 0; i < nr_cpus; i++) { if (i >= on_len || !online[i]) continue; - fd = perf_buffer__buffer_fd(pb, i); + fd = perf_buffer__buffer_fd(pb, j); CHECK(fd < 0 || last_fd == fd, "fd_check", "last fd %d == fd %d\n", last_fd, fd); last_fd = fd; - err = perf_buffer__consume_buffer(pb, i); + err = perf_buffer__consume_buffer(pb, j); if (CHECK(err, "drain_buf", "cpu %d, err %d\n", i, err)) goto out_close; @@ -127,12 +127,13 @@ void serial_test_perf_buffer(void) if (trigger_on_cpu(i)) goto out_close; - err = perf_buffer__consume_buffer(pb, i); - if (CHECK(err, "consume_buf", "cpu %d, err %d\n", i, err)) + err = perf_buffer__consume_buffer(pb, j); + if (CHECK(err, "consume_buf", "cpu %d, err %d\n", j, err)) goto out_close; if (CHECK(!CPU_ISSET(i, &cpu_seen), "cpu_seen", "cpu %d not seen\n", i)) goto out_close; + j++; } out_free_pb: From patchwork Thu Oct 21 11:41:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Olsa X-Patchwork-Id: 12574745 X-Patchwork-Delegate: bpf@iogearbox.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7169EC433FE for ; Thu, 21 Oct 2021 11:41:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 59291611BD for ; Thu, 21 Oct 2021 11:41:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230365AbhJULoN (ORCPT ); Thu, 21 Oct 2021 07:44:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:29793 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230375AbhJULoJ (ORCPT ); Thu, 21 Oct 2021 07:44:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634816513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=srAxXppIvHz+myMAl+rb3OMXLAjwG2sT2dL0Sifr8SY=; b=Ml8QgT+qYdLA+R3BA2kYMTfFaMksbXnT1bZRAL+QxEgw/H2Ap3yA1pk9qDmv75PI1SjFXW TlMkD+b0I1evLxaxgfL7A7TOLELIZioJ2zfMPtTXuhYDZtsio83rs0DJK+JkDKPzZRCCZ9 MSnyDgb2tHmITvcLwyr3jmoArS0Asec= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-339-NO4KkfDlPdui6iEzNrxDYg-1; Thu, 21 Oct 2021 07:41:52 -0400 X-MC-Unique: NO4KkfDlPdui6iEzNrxDYg-1 Received: by mail-ed1-f70.google.com with SMTP id d3-20020a056402516300b003db863a248eso23990488ede.16 for ; Thu, 21 Oct 2021 04:41:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=srAxXppIvHz+myMAl+rb3OMXLAjwG2sT2dL0Sifr8SY=; b=qFEZV5nDay34bkSqlk3BT6QDNs9FNx3qkAIXJKSr7wiRgdQ+mR/p9bAMiTMw3sC05c IJwb0zpiljPivhgHRUj8H+81nPBvylLjFjh+8SjunZmlhZgnxvxbjbBCIUHS8rvVl6G+ fptKUtdzBrVWjYORR6o1AwsnBrcKJR9OkAmm5ZtXxfTnhcUTn9r5+ZknwKDtBvpJnv1g OhBhQncqE2S7c6dsduPEB34q8xVqJGnPVaVbgLaP20VTMQTzc/8qO5foSGCM26r99C/c Re8q/PiJJTZijNvQ3ksiIsTeDyBn5Me451IvshxeaArTZLqPRN8Oc0EEZyw/wXhQW+Cu F39w== X-Gm-Message-State: AOAM531ZoIhuA0dO2I4EVm8FePp+5dSO1pWUTeRjzvRFzJJPwqs9ljIN 2c1WUDY9mzyNTHZwwFMSqv2GLB9b3f+NSzszjNCOyjfZCOhlT//71relb3ZUFZwaqLEmTvnhUF0 Ek+2Tt7aLjreHz4yf X-Received: by 2002:a05:6402:50d4:: with SMTP id h20mr7009042edb.112.1634816511346; Thu, 21 Oct 2021 04:41:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNkiRG6MQhchj2BPeZhgF7KMFN9UW11wQbBPpenEdGJRKXrqcz/xS8eCT3E+oZ38nmMtm6RQ== X-Received: by 2002:a05:6402:50d4:: with SMTP id h20mr7009009edb.112.1634816511158; Thu, 21 Oct 2021 04:41:51 -0700 (PDT) Received: from krava.cust.in.nbox.cz ([83.240.63.48]) by smtp.gmail.com with ESMTPSA id u23sm2747922edr.97.2021.10.21.04.41.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Oct 2021 04:41:50 -0700 (PDT) From: Jiri Olsa X-Google-Original-From: Jiri Olsa To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh Subject: [PATCH bpf-next 3/3] selftests/bpf: Use nanosleep tracepoint in perf buffer test Date: Thu, 21 Oct 2021 13:41:32 +0200 Message-Id: <20211021114132.8196-4-jolsa@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211021114132.8196-1-jolsa@kernel.org> References: <20211021114132.8196-1-jolsa@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: bpf@iogearbox.net The perf buffer tests triggers trace with nanosleep syscall, but monitors all syscalls, which results in lot of data in the buffer and makes it harder to debug. Let's lower the trace traffic and monitor just nanosleep syscall. Signed-off-by: Jiri Olsa --- tools/testing/selftests/bpf/progs/test_perf_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/progs/test_perf_buffer.c b/tools/testing/selftests/bpf/progs/test_perf_buffer.c index d37ce29fd393..a08874c5bdf2 100644 --- a/tools/testing/selftests/bpf/progs/test_perf_buffer.c +++ b/tools/testing/selftests/bpf/progs/test_perf_buffer.c @@ -12,7 +12,7 @@ struct { __type(value, int); } perf_buf_map SEC(".maps"); -SEC("tp/raw_syscalls/sys_enter") +SEC("tp/syscalls/sys_enter_nanosleep") int handle_sys_enter(void *ctx) { int cpu = bpf_get_smp_processor_id();