On 2023/7/6 16:52, David Marchand wrote:
On Tue, Jul 4, 2023 at 4:11 PM Thomas Monjalon <tho...@monjalon.net> wrote:
04/07/2023 10:04, Jie Hai:
On 2023/6/20 22:34, Thomas Monjalon wrote:
20/06/2023 10:14, Jie Hai:
On 2023/2/20 20:55, David Marchand wrote:
On Fri, Feb 10, 2023 at 3:50 AM Jie Hai <haij...@huawei.com> wrote:
This patch supports dump of ring information by its name.
An example using this command is shown below:
--> /ring/info,MP_mb_pool_0
{
"/ring/info": {
"name": "MP_mb_pool_0",
"socket": 0,
"flags": "0x0",
"producer_type": "MP",
"consumer_type": "MC",
"size": 262144,
"mask": "0x3ffff",
"capacity": 262143,
"used_count": 153197,
"consumer_tail": 2259,
"consumer_head": 2259,
"producer_tail": 155456,
"producer_head": 155456,
What would an external user make of such an information?
I'd like to have a better idea what your usecase is.
If it is for debugging, well, gdb is probably a better candidate.
Hi David,
Thanks for your question and I'm sorry for getting back to you so late.
There was a problem with my mailbox and I lost all my mails.
The ring information exported by telemetry can be used to check the ring
status periodically during normal use. When an error occurs, the fault
cause can be deduced based on the information.
GDB is more suitable for locating errors only when they are sure that
errors will occur.
Yes, when an error occurs, you can use GDB,
and you don't need all these internal values in telemetry.
Hi, David, Thomas,
Would it be better to delete the last four items?
"consumer_tail": 2259,
"consumer_head": 2259,
"producer_tail": 155456,
"producer_head": 155456,
Yes it would be better.
David, other maintainers, would it make the telemetry command a good idea?
Without the ring head/tail exposed, it seems ok.
It still exposes the ring flags which are kind of internal things, but
those are parts of the API/ABI, iiuc, so it should not be an issue.
Similar to "name" and "size" of ring, "flags" of ring is also determined
by user input. I think it's ok to expose it, users can use it to check
if the configuration is as they want.
And the proc-info also exposes this flag.