[RFC v2 12/14] lib: convert to per line logging
David Marchand
david.marchand at redhat.com
Mon Dec 11 13:34:24 CET 2023
On Fri, Dec 8, 2023 at 6:16 PM Stephen Hemminger
<stephen at networkplumber.org> wrote:
>
> On Fri, 8 Dec 2023 15:59:46 +0100
> David Marchand <david.marchand at redhat.com> wrote:
>
> > Convert many libraries that call RTE_LOG(... "\n", ...) to RTE_LOG_LINE.
> >
> > Note:
> > - for acl and sched libraries that still has some debug multilines
> > messages, a direct call to RTE_LOG is used: this will make it easier to
> > notice such special cases,
> >
> > Signed-off-by: David Marchand <david.marchand at redhat.com>
> > ---
> > lib/acl/acl_bld.c | 28 +--
> > lib/acl/acl_gen.c | 8 +-
> > lib/acl/rte_acl.c | 8 +-
> > lib/acl/tb_mem.c | 4 +-
> > lib/eal/common/eal_common_bus.c | 22 +-
> > lib/eal/common/eal_common_class.c | 4 +-
> > lib/eal/common/eal_common_config.c | 2 +-
> > lib/eal/common/eal_common_debug.c | 6 +-
> > lib/eal/common/eal_common_dev.c | 80 +++----
> > lib/eal/common/eal_common_devargs.c | 18 +-
> > lib/eal/common/eal_common_dynmem.c | 34 +--
> > lib/eal/common/eal_common_fbarray.c | 12 +-
> > lib/eal/common/eal_common_interrupts.c | 38 ++--
> > lib/eal/common/eal_common_lcore.c | 26 +--
> > lib/eal/common/eal_common_memalloc.c | 12 +-
> > lib/eal/common/eal_common_memory.c | 66 +++---
> > lib/eal/common/eal_common_memzone.c | 24 +--
> > lib/eal/common/eal_common_options.c | 236 ++++++++++----------
> > lib/eal/common/eal_common_proc.c | 112 +++++-----
> > lib/eal/common/eal_common_tailqs.c | 12 +-
> > lib/eal/common/eal_common_thread.c | 12 +-
> > lib/eal/common/eal_common_timer.c | 6 +-
> > lib/eal/common/eal_common_trace_utils.c | 2 +-
> > lib/eal/common/eal_trace.h | 4 +-
> > lib/eal/common/hotplug_mp.c | 54 ++---
> > lib/eal/common/malloc_elem.c | 6 +-
> > lib/eal/common/malloc_heap.c | 40 ++--
> > lib/eal/common/malloc_mp.c | 72 +++----
> > lib/eal/common/rte_keepalive.c | 2 +-
> > lib/eal/common/rte_malloc.c | 10 +-
> > lib/eal/common/rte_service.c | 8 +-
> > lib/eal/freebsd/eal.c | 74 +++----
> > lib/eal/freebsd/eal_alarm.c | 2 +-
> > lib/eal/freebsd/eal_dev.c | 8 +-
> > lib/eal/freebsd/eal_hugepage_info.c | 22 +-
> > lib/eal/freebsd/eal_interrupts.c | 60 +++---
> > lib/eal/freebsd/eal_lcore.c | 2 +-
> > lib/eal/freebsd/eal_memalloc.c | 10 +-
> > lib/eal/freebsd/eal_memory.c | 34 +--
> > lib/eal/freebsd/eal_thread.c | 2 +-
> > lib/eal/freebsd/eal_timer.c | 10 +-
> > lib/eal/linux/eal.c | 122 +++++------
> > lib/eal/linux/eal_alarm.c | 2 +-
> > lib/eal/linux/eal_dev.c | 40 ++--
> > lib/eal/linux/eal_hugepage_info.c | 38 ++--
> > lib/eal/linux/eal_interrupts.c | 116 +++++-----
> > lib/eal/linux/eal_lcore.c | 4 +-
> > lib/eal/linux/eal_memalloc.c | 120 +++++------
> > lib/eal/linux/eal_memory.c | 208 +++++++++---------
> > lib/eal/linux/eal_thread.c | 4 +-
> > lib/eal/linux/eal_timer.c | 10 +-
> > lib/eal/linux/eal_vfio.c | 270 +++++++++++------------
> > lib/eal/linux/eal_vfio_mp_sync.c | 4 +-
> > lib/eal/riscv/rte_cycles.c | 4 +-
> > lib/eal/unix/eal_filesystem.c | 14 +-
> > lib/eal/unix/eal_firmware.c | 2 +-
> > lib/eal/unix/eal_unix_memory.c | 8 +-
> > lib/eal/unix/rte_thread.c | 34 +--
> > lib/eal/windows/eal.c | 36 ++--
> > lib/eal/windows/eal_alarm.c | 12 +-
> > lib/eal/windows/eal_debug.c | 8 +-
> > lib/eal/windows/eal_dev.c | 8 +-
> > lib/eal/windows/eal_hugepages.c | 10 +-
> > lib/eal/windows/eal_interrupts.c | 10 +-
> > lib/eal/windows/eal_lcore.c | 6 +-
> > lib/eal/windows/eal_memalloc.c | 50 ++---
> > lib/eal/windows/eal_memory.c | 20 +-
> > lib/eal/windows/eal_windows.h | 4 +-
> > lib/eal/windows/include/rte_windows.h | 4 +-
> > lib/eal/windows/rte_thread.c | 28 +--
> > lib/efd/rte_efd.c | 58 ++---
> > lib/fib/rte_fib.c | 14 +-
> > lib/fib/rte_fib6.c | 14 +-
> > lib/hash/rte_cuckoo_hash.c | 52 ++---
> > lib/hash/rte_fbk_hash.c | 4 +-
> > lib/hash/rte_hash_crc.c | 12 +-
> > lib/hash/rte_thash.c | 20 +-
> > lib/hash/rte_thash_gfni.c | 8 +-
> > lib/ip_frag/rte_ip_frag_common.c | 8 +-
> > lib/latencystats/rte_latencystats.c | 41 ++--
> > lib/log/log.c | 6 +-
> > lib/lpm/rte_lpm.c | 12 +-
> > lib/lpm/rte_lpm6.c | 10 +-
> > lib/mbuf/rte_mbuf.c | 14 +-
> > lib/mbuf/rte_mbuf_dyn.c | 14 +-
> > lib/mbuf/rte_mbuf_pool_ops.c | 4 +-
> > lib/mempool/rte_mempool.c | 24 +--
> > lib/mempool/rte_mempool.h | 2 +-
> > lib/mempool/rte_mempool_ops.c | 10 +-
> > lib/pipeline/rte_pipeline.c | 228 ++++++++++----------
> > lib/port/rte_port_ethdev.c | 18 +-
> > lib/port/rte_port_eventdev.c | 18 +-
> > lib/port/rte_port_fd.c | 24 +--
> > lib/port/rte_port_frag.c | 14 +-
> > lib/port/rte_port_ras.c | 12 +-
> > lib/port/rte_port_ring.c | 18 +-
> > lib/port/rte_port_sched.c | 12 +-
> > lib/port/rte_port_source_sink.c | 48 ++---
> > lib/port/rte_port_sym_crypto.c | 18 +-
> > lib/power/guest_channel.c | 38 ++--
> > lib/power/power_acpi_cpufreq.c | 106 ++++-----
> > lib/power/power_amd_pstate_cpufreq.c | 120 +++++------
> > lib/power/power_common.c | 10 +-
> > lib/power/power_cppc_cpufreq.c | 118 +++++-----
> > lib/power/power_intel_uncore.c | 68 +++---
> > lib/power/power_kvm_vm.c | 22 +-
> > lib/power/power_pstate_cpufreq.c | 144 ++++++-------
> > lib/power/rte_power.c | 22 +-
> > lib/power/rte_power_pmd_mgmt.c | 34 +--
> > lib/power/rte_power_uncore.c | 14 +-
> > lib/rcu/rte_rcu_qsbr.c | 2 +-
> > lib/reorder/rte_reorder.c | 32 +--
> > lib/rib/rte_rib.c | 10 +-
> > lib/rib/rte_rib6.c | 10 +-
> > lib/ring/rte_ring.c | 24 +--
> > lib/sched/rte_pie.c | 18 +-
> > lib/sched/rte_sched.c | 274 ++++++++++++------------
> > lib/table/rte_table_acl.c | 72 +++----
> > lib/table/rte_table_array.c | 16 +-
> > lib/table/rte_table_hash_cuckoo.c | 22 +-
> > lib/table/rte_table_hash_ext.c | 22 +-
> > lib/table/rte_table_hash_key16.c | 38 ++--
> > lib/table/rte_table_hash_key32.c | 38 ++--
> > lib/table/rte_table_hash_key8.c | 38 ++--
> > lib/table/rte_table_hash_lru.c | 22 +-
> > lib/table/rte_table_lpm.c | 42 ++--
> > lib/table/rte_table_lpm_ipv6.c | 44 ++--
> > lib/table/rte_table_stub.c | 4 +-
> > lib/vhost/fd_man.c | 8 +-
> > 129 files changed, 2278 insertions(+), 2279 deletions(-)
>
> Coccinelle script for later fixups?
I had a look, but I fail to see how to express matching / splitting a
string for a certain delimiter with coccinelle.
There is probably a need to call some external python... ?
Honestly, I was hoping you would volunteer on this topic :-).
--
David Marchand
More information about the dev
mailing list