Skip to content

logging: CONFIG_LOG_INPLACE_PROCESS is not synchronous #11633

@pfalcon

Description

@pfalcon

So, is was said many times that new logging has a "synchronous" mode to which it switches when something bad happens, and which can be enabled to be default via Kconfig at all. Some time ago, I looked which Kconfig option is that, and the only related thing I could find was CONFIG_LOG_INPLACE_PROCESS. I asked @carlescufi on IRC what was the right option, and he said that CONFIG_LOG_INPLACE_PROCESS indeed it is. I replied that I don't see it working as expected.

So, here now again, I don't see it working as expected. Consider following code snippet:

        printk("eth_smsc9220_isr: %x %x\n", SMSC9220->INT_STS, SMSC9220->INT_EN);

        struct eth_context *context = dev->driver_data;

        u32_t int_status = SMSC9220->INT_STS;
        /* Ack pending interrupts */
        SMSC9220->INT_STS = int_status;

        if (int_status & BIT(enum_smsc9220_interrupt_rxstatus_fifo_level)) {
                LOG_DBG("in RX FIFO: pkts: %u, bytes: %u",
                        SMSC9220_BFIELD(RX_FIFO_INF, RXSUSED),
                        SMSC9220_BFIELD(RX_FIFO_INF, RXDUSED));
                printk("this should be shown immediately after 'in RX FIFO'\n");

It's clear that the expected output in synchro mode that I seek is:

eth_smsc9220_isr: 8 8
[00:00:11.380,042] <dbg> eth_smsc9220.eth_smsc9220_isr: in RX FIFO: pkts: 1, bytes: 48
this should be shown immediately after 'in RX FIFO'

Instead, I get:

eth_smsc9220_isr: 8 8
this should be shown immediately after 'in RX FIFO'

(If you care, I don't get "in RX FIFO: pkts:" logging at all, but let that be subject of another bugreport.)

Metadata

Metadata

Assignees

Labels

area: LoggingbugThe issue is a bug, or the PR is fixing a bugpriority: mediumMedium impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions