Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package bpftrace for openSUSE:Factory 
checked in at 2025-04-14 12:59:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/bpftrace (Old)
 and      /work/SRC/openSUSE:Factory/.bpftrace.new.1907 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "bpftrace"

Mon Apr 14 12:59:05 2025 rev:33 rq:1269108 version:0.23.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/bpftrace/bpftrace.changes        2025-01-09 
15:11:28.058331740 +0100
+++ /work/SRC/openSUSE:Factory/.bpftrace.new.1907/bpftrace.changes      
2025-04-14 12:59:17.158526077 +0200
@@ -1,0 +2,125 @@
+Mon Apr 14 05:40:35 UTC 2025 - Shung-Hsi Yu <shung-hsi...@suse.com>
+
+- Update to 0.23.1
+  * Fix build failures due to missing location.hh 
+
+-------------------------------------------------------------------
+Thu Mar 27 07:06:04 UTC 2025 - Shung-Hsi Yu <shung-hsi...@suse.com>
+
+- Fix runqlen tool to work on 6.14 kernel (bsc#1239774)
+  * add 0001-tools-runqlen.bt-rename-nr_running-to-nr_queued.patch
+- Update to 0.23.0
+  * Breaking Changes
+    * Remove '-kk' command line opt, surface some BPF errors by
+      default, and make '-k' surface probe read errors
+  * Added
+    * offsetof() now supports sub fields
+      e.g. offsetof(struct Foo, bar.a.b);
+    * Pointers may now be used in if conditions, tenary conditions and
+      as operands in logical AND and OR expressions
+    * len now also accepts ustack and kstack as arguments
+    * Add ability to cast int to an enum
+    * Added warning when strcontains() is used on strings that are too
+      big and may cause verifier issues
+    * Add support for LLVM 20
+  * Changed
+    * probe builtin is now represented as a string type
+    * Change bpftrace help flag output from stderr to stdout
+    * Change max_strlen default from 64 to 1024
+    * Add feature check for castable map reads
+    * Increase default values for max_bpf_progs and max_probes
+    * Allow use of variables before they are assigned
+  * Removed
+    * Drop support for LLVM 14 and 15
+  * Fixed
+    * Fix json output for none type
+    * Fix bug where strftime() %f specifier could be off by up to 1s
+    * Fix pid, tid and ustack when running bpftrace in containers with
+      PID namespacing
+    * Do not generate functions for empty attach points
+    * Fix ternary expression to accept all types
+    * Fix feature detection for tracing program types
+    * Fix strcontains() correctness bug where matches could be lost if
+      both strings are non-literal
+    * Fix str() bug where optional size parameter did not count
+      towards NUL terminator
+  * Tools
+    * Fix dcsnoop.bt on newer kernels
+- Update to 0.22.1
+  * Fixed
+    * Do not generate functions for empty attach points
+  * Tools
+    * Switch all bio* tools to tracepoints
+    * Fix dcsnoop.bt on newer kernels
+- Update to 0.22.0
+  * Breaking Changes
+    * Return uint32 instead of uint64 for pid and tid builtins
+    * Remove multi-map delete functionality
+    * Add lexical/block scoping for variables
+    * Replace default map printing on SIGUSR1 with custom signal
+      handling probes
+  * Added
+    * Bump max supported LLVM version to 19
+      * drop 0002-Drop-support-for-LLVM-12-and-below.patch
+      * drop 0003-cmake-Allow-any-LLVM-release-for-debug-builds.patch
+      * drop 0004-Bump-max-LLVM-version-to-19-3433.patch
+    * Add --dry-run CLI option
+    * Enable avg map reads in kernel space (implicit casting)
+    * Enable for-loops in multiple probes
+    * For-loops: Allow sharing variables between the main probe and
+      the loop's body
+    * Parse C++ Class and Inheritance from Debug Info
+    * Add an optional size parameter to path
+    * Allow tuples to be used as map keys
+    * Add has_key function for maps
+    * Add ability to attach kprobes to inlined functions
+    * Variable declarations with let
+    * Support symbolizing enum values using %s specifier in printf()
+    * Configuration option to suppress printing maps by default at
+      program exit
+    * Add symbol_source config to source uprobe locations from either
+      DWARF or the Symbol Table
+    * Introduce builtin to access percpu kernel data
+  * Changed
+    * Merge output into stdout when -lv
+    * Stream output when printing maps
+    * Only print kernel headers not found message if parsing fails
+    * Add mandatory "stage" argument to the -d CLI option
+    * Allow simultaneous use of -v and -d
+    * Remove length limitations for the buf builtin function
+    * Change delete API to accept a map and key as separate args
+    * Symbolize enums when used in maps
+  * Removed
+    * Remove the -dd CLI option
+    * Drop support for LLVM 12 and below
+    * Remove ALLOW_UNSAFE_PROBE compiler flag
+  * Fixed
+    * Fix verifier error when array indexing through pointer
+    * Fix segfault for multi-tracepoint probes
+    * Fix verifier error from misaligned stack access when using
+      strings as map keys
+    * Fix min/max map functions
+    * Fix stack mode for stack builtin
+    * Fix lldb support in appimage builds
+    * Fix parsing large unsigned int strings as positional params
+    * Fix json formatting for strftime function
+    * Fix BTF/DWARF parsing for structs contained in arrays
+    * Fix integer comparisons and auto casting for scratch variables
+    * Fix tuple resizing
+    * Handle invalid BTF without crashing
+    * Fix json formatting for hex values
+    * Fix binary operations on integers always returning 64 bit values
+    * Fix verifier error when comparing result of len()
+    * Fix type back propagation for map keys
+    * Fix crash by adding checks for bad var/map assignments
+    * Fix field access and offsetof for strings that are builtin types
+    * Fix crash when using castable per-cpu map types as map keys
+    * Fix loop values with per-cpu aggregations
+  * Docs
+    * Remove mention of unsupported character literals
+  * Tools
+    * Fix bashreadline tool probe for dynamically linked readline and drop
+      0001-tools-bashreadline-fix-probe-for-dynamically-linked-.patch
+- Bump maximum support LLVM version to 20
+
+-------------------------------------------------------------------

Old:
----
  0001-tools-bashreadline-fix-probe-for-dynamically-linked-.patch
  0002-Drop-support-for-LLVM-12-and-below.patch
  0003-cmake-Allow-any-LLVM-release-for-debug-builds.patch
  0004-Bump-max-LLVM-version-to-19-3433.patch
  bpftrace-0.21.3.tar.gz

New:
----
  0001-tools-runqlen.bt-rename-nr_running-to-nr_queued.patch
  bpftrace-0.23.1.tar.gz

BETA DEBUG BEGIN:
  Old:    * Fix bashreadline tool probe for dynamically linked readline and drop
      0001-tools-bashreadline-fix-probe-for-dynamically-linked-.patch
- Bump maximum support LLVM version to 20
  Old:    * Bump max supported LLVM version to 19
      * drop 0002-Drop-support-for-LLVM-12-and-below.patch
      * drop 0003-cmake-Allow-any-LLVM-release-for-debug-builds.patch
  Old:      * drop 0002-Drop-support-for-LLVM-12-and-below.patch
      * drop 0003-cmake-Allow-any-LLVM-release-for-debug-builds.patch
      * drop 0004-Bump-max-LLVM-version-to-19-3433.patch
  Old:      * drop 0003-cmake-Allow-any-LLVM-release-for-debug-builds.patch
      * drop 0004-Bump-max-LLVM-version-to-19-3433.patch
    * Add --dry-run CLI option
BETA DEBUG END:

BETA DEBUG BEGIN:
  New:- Fix runqlen tool to work on 6.14 kernel (bsc#1239774)
  * add 0001-tools-runqlen.bt-rename-nr_running-to-nr_queued.patch
- Update to 0.23.0
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ bpftrace.spec ++++++
--- /var/tmp/diff_new_pack.jcr9eI/_old  2025-04-14 12:59:17.810553458 +0200
+++ /var/tmp/diff_new_pack.jcr9eI/_new  2025-04-14 12:59:17.814553626 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package bpftrace
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,8 +18,8 @@
 
 # Use default LLVM unless it is not yet supported
 %if 0%{?suse_version} >= 1600
- %if 0%{?product_libs_llvm_ver} > 19
- %define llvm_major_version 19
+ %if 0%{?product_libs_llvm_ver} > 20
+ %define llvm_major_version 20
  %else
  %define llvm_major_version %{nil}
  %endif
@@ -49,19 +49,15 @@
 %endif
 
 Name:           bpftrace
-Version:        0.21.3
+Version:        0.23.1
 Release:        0
 Summary:        High-level tracing language for Linux eBPF
 License:        Apache-2.0
 Group:          Development/Tools/Debuggers
 URL:            https://github.com/iovisor/bpftrace
 Source:         
https://github.com/iovisor/bpftrace/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
-# PATCH-FIX-UPSTREAM 
0001-tools-bashreadline-fix-probe-for-dynamically-linked-.patch bsc#1232536
-Patch0:         0001-tools-bashreadline-fix-probe-for-dynamically-linked-.patch
-Patch1:         0002-Drop-support-for-LLVM-12-and-below.patch
-Patch2:         0003-cmake-Allow-any-LLVM-release-for-debug-builds.patch
-# PATCH-FIX-UPSTREAM 0004-Bump-max-LLVM-version-to-19-3433.patch 
bpftrace/bpftrace##3433
-Patch3:         0004-Bump-max-LLVM-version-to-19-3433.patch
+# PATCH-FIX-UPSTREAM 
0001-tools-runqlen.bt-rename-nr_running-to-nr_queued.patch bsc#1239774
+Patch0:         0001-tools-runqlen.bt-rename-nr_running-to-nr_queued.patch
 BuildRequires:  %cc_package
 BuildRequires:  binutils
 BuildRequires:  binutils-devel
@@ -133,6 +129,8 @@
 %files
 %{_bindir}/bpftrace
 %{_bindir}/bpftrace-aotrt
+# TODO: bash completion should be its own package
+%{_datadir}/bash-completion/completions/bpftrace
 %{_mandir}/man8/bpftrace.8%{?ext_man}
 %doc README.md docs/
 %license LICENSE

++++++ 0001-tools-runqlen.bt-rename-nr_running-to-nr_queued.patch ++++++
>From beba5c0b47933db767f71900f67fb77d2976e9ed Mon Sep 17 00:00:00 2001
From: Shung-Hsi Yu <shung-hsi...@suse.com>
Date: Tue, 25 Mar 2025 09:48:54 +0800
Subject: [PATCH 1/1] tools/runqlen.bt: rename nr_running to nr_queued

With "sched/fair: Fix statistics with delayed dequeue" series (more
specifically torvalds/linux@736c55a02c47) several fields in "struct
cfs_rq" is renamed, leading to runqlen.bt to fail at runtime with the
following error:

  ERROR: Struct/union of type 'struct cfs_rq' does not contain a field named 
'nr_running'
      $len = $my_q->nr_running;

Move existing runqlen script to tools/old/, create a copy of the original with
with nr_running changed to nr_queued in its place, and has GitHub CI use the
old version of runqlen for testing.

While at it, also touch up the comment regarding BTF.

Link: 
https://lore.kernel.org/all/20241202174606.4074512-1-vincent.guit...@linaro.org/
Signed-off-by: Shung-Hsi Yu <shung-hsi...@suse.com>
---
 tools/old/runqlen.bt     | 41 ++++++++++++++++++++++++++++++++++++++++
 tools/runqlen.bt         |  8 ++++----
 3 files changed, 45 insertions(+), 4 deletions(-)
 create mode 100755 tools/old/runqlen.bt

diff --git a/tools/old/runqlen.bt b/tools/old/runqlen.bt
new file mode 100755
index 00000000..23a7fb85
--- /dev/null
+++ b/tools/old/runqlen.bt
@@ -0,0 +1,41 @@
+#!/usr/bin/env bpftrace
+/*
+ * runqlen.bt  CPU scheduler run queue length as a histogram.
+ *             For Linux, uses bpftrace, eBPF.
+ *
+ * This is a bpftrace version of the bcc tool of the same name.
+ *
+ * For Linux < 6.14.
+ *
+ * Copyright 2018 Netflix, Inc.
+ * Licensed under the Apache License, Version 2.0 (the "License")
+ *
+ * 07-Oct-2018 Brendan Gregg   Created this.
+ */
+
+#ifndef BPFTRACE_HAVE_BTF
+#include <linux/sched.h>
+
+// Without BTF, we'll need to declare some of this struct manually,
+// since it isn't available to be #included. This will need maintenance to 
match
+// your kernel version. It is from kernel/sched/sched.h:
+struct cfs_rq {
+       struct load_weight load;
+       unsigned int nr_running;
+       unsigned int h_nr_running;
+};
+#endif
+
+BEGIN
+{
+       printf("Sampling run queue length at 99 Hertz... Hit Ctrl-C to end.\n");
+}
+
+profile:hz:99
+{
+       $task = (struct task_struct *)curtask;
+       $my_q = (struct cfs_rq *)$task->se.cfs_rq;
+       $len = (uint64)$my_q->nr_running;
+       $len = $len > 0 ? $len - 1 : 0; // subtract currently running task
+       @runqlen = lhist($len, 0, 100, 1);
+}
diff --git a/tools/runqlen.bt b/tools/runqlen.bt
index 5d8730a1..394a7b3d 100755
--- a/tools/runqlen.bt
+++ b/tools/runqlen.bt
@@ -14,13 +14,13 @@
 #ifndef BPFTRACE_HAVE_BTF
 #include <linux/sched.h>
 
-// Until BTF is available, we'll need to declare some of this struct manually,
+// Without BTF, we'll need to declare some of this struct manually,
 // since it isn't available to be #included. This will need maintenance to 
match
 // your kernel version. It is from kernel/sched/sched.h:
 struct cfs_rq {
        struct load_weight load;
-       unsigned int nr_running;
-       unsigned int h_nr_running;
+       unsigned int nr_queued;
+       unsigned int h_nr_queued;
 };
 #endif
 
@@ -33,7 +33,7 @@ profile:hz:99
 {
        $task = (struct task_struct *)curtask;
        $my_q = (struct cfs_rq *)$task->se.cfs_rq;
-       $len = (uint64)$my_q->nr_running;
+       $len = (uint64)$my_q->nr_queued;
        $len = $len > 0 ? $len - 1 : 0; // subtract currently running task
        @runqlen = lhist($len, 0, 100, 1);
 }
-- 
2.49.0


++++++ bpftrace-0.21.3.tar.gz -> bpftrace-0.23.1.tar.gz ++++++
++++ 108117 lines of diff (skipped)

Reply via email to