Skip to contentSkip to conversation

arm/trace: Fix hex printing

PATCH In review Dr. David Alan Gilbert (git) 4 participants 7 messages Oct 14, 2020 – Oct 27, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm/trace: Fix hex printing

From: "Dr. David Alan Gilbert" <[email protected]>

Use of 0x%d - make up our mind as 0x%x

---
 hw/arm/trace-events | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/trace-events +1 -1
index c8a4d80f6b..a335ee891d 100644
@@ -41,7 +41,7 @@ smmuv3_get_cd(uint64_t addr) "CD addr: 0x%"PRIx64
 smmuv3_decode_cd(uint32_t oas) "oas=%d"
 smmuv3_decode_cd_tt(int i, uint32_t tsz, uint64_t ttb, uint32_t granule_sz, bool had) "TT[%d]:tsz:%d ttb:0x%"PRIx64" granule_sz:%d had:%d"
 smmuv3_cmdq_cfgi_ste(int streamid) "streamid =%d"
-smmuv3_cmdq_cfgi_ste_range(int start, int end) "start=0x%d - end=0x%d"
+smmuv3_cmdq_cfgi_ste_range(int start, int end) "start=0x%x - end=0x%x"
 smmuv3_cmdq_cfgi_cd(uint32_t sid) "streamid = %d"
 smmuv3_config_cache_hit(uint32_t sid, uint32_t hits, uint32_t misses, uint32_t perc) "Config cache HIT for sid %d (hits=%d, misses=%d, hit rate=%d)"
 smmuv3_config_cache_miss(uint32_t sid, uint32_t hits, uint32_t misses, uint32_t perc) "Config cache MISS for sid %d (hits=%d, misses=%d, hit rate=%d)"
Signature · 1 line
2.28.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Dr. David Alan Gilbert (git)

From: "Dr. David Alan Gilbert" <[email protected]>

Use of 0x%d - make up our mind as 0x%x

Uh...

(hw/arm/... in subject)

Quoted 20 lines
---
  hw/arm/trace-events | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/trace-events +1 -1
index c8a4d80f6b..a335ee891d 100644
@@ -41,7 +41,7 @@ smmuv3_get_cd(uint64_t addr) "CD addr: 0x%"PRIx64
  smmuv3_decode_cd(uint32_t oas) "oas=%d"
  smmuv3_decode_cd_tt(int i, uint32_t tsz, uint64_t ttb, uint32_t granule_sz, bool had) "TT[%d]:tsz:%d ttb:0x%"PRIx64" granule_sz:%d had:%d"
  smmuv3_cmdq_cfgi_ste(int streamid) "streamid =%d"
-smmuv3_cmdq_cfgi_ste_range(int start, int end) "start=0x%d - end=0x%d"
+smmuv3_cmdq_cfgi_ste_range(int start, int end) "start=0x%x - end=0x%x"
  smmuv3_cmdq_cfgi_cd(uint32_t sid) "streamid = %d"
  smmuv3_config_cache_hit(uint32_t sid, uint32_t hits, uint32_t misses, uint32_t perc) "Config cache HIT for sid %d (hits=%d, misses=%d, hit rate=%d)"
  smmuv3_config_cache_miss(uint32_t sid, uint32_t hits, uint32_t misses, uint32_t perc) "Config cache MISS for sid %d (hits=%d, misses=%d, hit rate=%d)"
Acked-by on v1 1/1
#2 lore raw
In reply to Dr. David Alan Gilbert (git)

Hi Dave,

Quoted 5 lines · Dr. David Alan Gilbert (git)

From: "Dr. David Alan Gilbert" <[email protected]>

Use of 0x%d - make up our mind as 0x%x

Thanks

Eric

Quoted 18 lines
---
 hw/arm/trace-events | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/trace-events +1 -1
index c8a4d80f6b..a335ee891d 100644
@@ -41,7 +41,7 @@ smmuv3_get_cd(uint64_t addr) "CD addr: 0x%"PRIx64
 smmuv3_decode_cd(uint32_t oas) "oas=%d"
 smmuv3_decode_cd_tt(int i, uint32_t tsz, uint64_t ttb, uint32_t granule_sz, bool had) "TT[%d]:tsz:%d ttb:0x%"PRIx64" granule_sz:%d had:%d"
 smmuv3_cmdq_cfgi_ste(int streamid) "streamid =%d"
-smmuv3_cmdq_cfgi_ste_range(int start, int end) "start=0x%d - end=0x%d"
+smmuv3_cmdq_cfgi_ste_range(int start, int end) "start=0x%x - end=0x%x"
 smmuv3_cmdq_cfgi_cd(uint32_t sid) "streamid = %d"
 smmuv3_config_cache_hit(uint32_t sid, uint32_t hits, uint32_t misses, uint32_t perc) "Config cache HIT for sid %d (hits=%d, misses=%d, hit rate=%d)"
 smmuv3_config_cache_miss(uint32_t sid, uint32_t hits, uint32_t misses, uint32_t perc) "Config cache MISS for sid %d (hits=%d, misses=%d, hit rate=%d)"
#3 lore raw
In reply to Dr. David Alan Gilbert (git)
Quoted 15 lines · Dr. David Alan Gilbert (git)

From: "Dr. David Alan Gilbert" <[email protected]>

Use of 0x%d - make up our mind as 0x%x

---
 hw/arm/trace-events | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/trace-events +0 -0
index c8a4d80f6b..a335ee891d 100644

hw/arm/trace-events smmuv3_get_cd(uint64_t addr) "CD addr: 0x%"PRIx64 · line 44

Quoted 5 lines
hw/arm/trace-events +1 -1
@@ -41,7 +41,7 @@ smmuv3_get_cd(uint64_t addr) "CD addr: 0x%"PRIx64
 smmuv3_decode_cd(uint32_t oas) "oas=%d"
 smmuv3_decode_cd_tt(int i, uint32_t tsz, uint64_t ttb, uint32_t granule_sz, bool had) "TT[%d]:tsz:%d ttb:0x%"PRIx64" granule_sz:%d had:%d"
 smmuv3_cmdq_cfgi_ste(int streamid) "streamid =%d"
-smmuv3_cmdq_cfgi_ste_range(int start, int end) "start=0x%d - end=0x%d"
+smmuv3_cmdq_cfgi_ste_range(int start, int end) "start=0x%x - end=0x%x"

Ah, I missed that you'd sent this patch before.

Eric, do we want to use hex here, or should we go for decimal the way we do with (almost) all the other tracing of stream IDs (eg mmuv3_cmdq_cfgi_ste in the line before)?

The other odd-one-out is smmuv3_find_ste which prints a hex SID; I think the other tracing of SIDs is always decimal.

thanks
-- PMM

#4 lore raw

Hi Peter,

Quoted 25 lines · Peter Maydell
Quoted 15 lines · Dr. David Alan Gilbert (git)

From: "Dr. David Alan Gilbert" <[email protected]>

Use of 0x%d - make up our mind as 0x%x

---
 hw/arm/trace-events | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/trace-events +0 -0
index c8a4d80f6b..a335ee891d 100644

hw/arm/trace-events smmuv3_get_cd(uint64_t addr) "CD addr: 0x%"PRIx64 · line 44

Quoted 5 lines
hw/arm/trace-events +1 -1
@@ -41,7 +41,7 @@ smmuv3_get_cd(uint64_t addr) "CD addr: 0x%"PRIx64
 smmuv3_decode_cd(uint32_t oas) "oas=%d"
 smmuv3_decode_cd_tt(int i, uint32_t tsz, uint64_t ttb, uint32_t granule_sz, bool had) "TT[%d]:tsz:%d ttb:0x%"PRIx64" granule_sz:%d had:%d"
 smmuv3_cmdq_cfgi_ste(int streamid) "streamid =%d"
-smmuv3_cmdq_cfgi_ste_range(int start, int end) "start=0x%d - end=0x%d"
+smmuv3_cmdq_cfgi_ste_range(int start, int end) "start=0x%x - end=0x%x"

Ah, I missed that you'd sent this patch before.

Quoted 6 lines

Eric, do we want to use hex here, or should we go for decimal the way we do with (almost) all the other tracing of stream IDs (eg mmuv3_cmdq_cfgi_ste in the line before)?

The other odd-one-out is smmuv3_find_ste which prints a hex SID; I think the other tracing of SIDs is always decimal.

I think my preference would be to use hexa here and in the other places.

Thanks

Eric

Quoted 4 lines

thanks
-- PMM

#5 lore raw
Quoted 11 lines · Auger Eric

Hi Peter,

Quoted 6 lines · Peter Maydell

Eric, do we want to use hex here, or should we go for decimal the way we do with (almost) all the other tracing of stream IDs (eg mmuv3_cmdq_cfgi_ste in the line before)?

The other odd-one-out is smmuv3_find_ste which prints a hex SID; I think the other tracing of SIDs is always decimal.

I think my preference would be to use hexa here and in the other places.

OK; I'll apply this patch to target-arm.next; feel free to send a patch updating the other tracepoints to hex.

-- PMM

#6 lore raw

Hi Peter,

Quoted 2 lines · Peter Maydell

OK; I'll apply this patch to target-arm.next; feel free to send a patch updating the other tracepoints to hex.

sure, I will.

Thanks

Eric