You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/09/27 11:39:28 UTC

[incubator-nuttx-apps] branch master updated: system/trace: expand dump string

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new d9ec9ca86 system/trace: expand dump string
d9ec9ca86 is described below

commit d9ec9ca868df9a4ed7124fbb1934f1af44eac244
Author: yinshengkai <yi...@xiaomi.com>
AuthorDate: Tue Sep 27 16:11:16 2022 +0800

    system/trace: expand dump string
    
    Signed-off-by: yinshengkai <yi...@xiaomi.com>
---
 system/trace/trace_dump.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/system/trace/trace_dump.c b/system/trace/trace_dump.c
index 46399f147..58cb6e881 100644
--- a/system/trace/trace_dump.c
+++ b/system/trace/trace_dump.c
@@ -640,15 +640,16 @@ static int trace_dump_one(trace_dump_t type, FAR FILE *out, FAR uint8_t *p,
           trace_dump_unflatten(&ip, nst->nst_ip, sizeof(ip));
 
           if (type == TRACE_TYPE_ANDROID &&
-              strlen(nst->nst_data) > 2 &&
-              (memcmp(nst->nst_data, "B|", 2) == 0 ||
-               memcmp(nst->nst_data, "E|", 2) == 0))
+              nst->nst_data[1] == '\0' &&
+              (nst->nst_data[0] == 'B' ||
+               nst->nst_data[0] == 'E'))
             {
-              fprintf(out, "tracing_mark_write: %s\n", nst->nst_data);
+              fprintf(out, "tracing_mark_write: %c|%d|%pS\n",
+                      nst->nst_data[0], pid, (FAR void *)ip);
             }
           else
             {
-              fprintf(out, "0x%" PRIdPTR ": %s\n", ip, nst->nst_data);
+              fprintf(out, "%pS: %s\n", (FAR void *)ip, nst->nst_data);
             }
         }
         break;