Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TE6] Read Software Diagnostic attributes from platform at runtime #9828

Merged
merged 4 commits into from
Sep 20, 2021
Merged

[TE6] Read Software Diagnostic attributes from platform at runtime #9828

merged 4 commits into from
Sep 20, 2021

Conversation

yufengwangca
Copy link
Contributor

Problem

What is being fixed? Examples:

  • Currently, the Software Diagnostic attributes are fully managed by the attribute store, we can only specify the default values in its xml definitions. We need to populate those attributes with the actual value from platform in run-time.

Change overview

Read Software Diagnostic attributes from platform at runtime

Testing

How was this tested? (at least one bullet point required)

  • ./chip-tool softwarediagnostics read current-heap-high-watermark 0
[1632146028.763469][331048:331055] CHIP:EM: Removed CHIP MessageCounter:00000000 from RetransTable
[1632146028.763489][331048:331055] CHIP:DMG: ReportData =
[1632146028.763499][331048:331055] CHIP:DMG: {
[1632146028.763511][331048:331055] CHIP:DMG: 	AttributeDataList =
[1632146028.763523][331048:331055] CHIP:DMG: 	[
[1632146028.763534][331048:331055] CHIP:DMG: 		AttributeDataElement =
[1632146028.763541][331048:331055] CHIP:DMG: 		{
[1632146028.763548][331048:331055] CHIP:DMG: 			AttributePath =
[1632146028.763557][331048:331055] CHIP:DMG: 			{
[1632146028.763564][331048:331055] CHIP:DMG: 				NodeId = 0x6b1f575cdd8cb692,
[1632146028.763573][331048:331055] CHIP:DMG: 				EndpointId = 0x0,
[1632146028.763580][331048:331055] CHIP:DMG: 				ClusterId = 0x34,
[1632146028.763589][331048:331055] CHIP:DMG: 				FieldTag = 0x3,
[1632146028.763595][331048:331055] CHIP:DMG: 			}
[1632146028.763604][331048:331055] CHIP:DMG: 				
[1632146028.763614][331048:331055] CHIP:DMG: 			Data = 636992, 
[1632146028.763621][331048:331055] CHIP:DMG: 			DataElementVersion = 0x0,
[1632146028.763629][331048:331055] CHIP:DMG: 		},
[1632146028.763639][331048:331055] CHIP:DMG: 		
[1632146028.763646][331048:331055] CHIP:DMG: 	],
[1632146028.763656][331048:331055] CHIP:DMG: 	
[1632146028.763663][331048:331055] CHIP:DMG: }
[1632146028.763694][331048:331055] CHIP:ZCL: ReadAttributesResponse:
[1632146028.763701][331048:331055] CHIP:ZCL:   ClusterId: 0x0000_0034
[1632146028.763710][331048:331055] CHIP:ZCL:   attributeId: 0x0000_0003
[1632146028.763717][331048:331055] CHIP:ZCL:   status: Success                (0x0000)
[1632146028.763724][331048:331055] CHIP:ZCL:   attribute TLV Type: 0x04
[1632146028.763730][331048:331055] CHIP:TOO: Int64u attribute Response: 636992

@github-actions
Copy link

Size increase report for "gn_qpg-example-build" from a8fa024

File Section File VM
chip-qpg6100-lighting-example.out .text 360 360
chip-qpg6100-lighting-example.out .bss 0 40
chip-qpg6100-lighting-example.out .data 4 4
chip-qpg6100-lighting-example.out .heap 0 -48
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-qpg6100-lighting-example.out.map and ./pull_artifact/chip-qpg6100-lighting-example.out.map:

BLOAT EXECUTION FAILED WITH CODE 1:
bloaty: unknown file type for file './pull_artifact/chip-qpg6100-lighting-example.out.map'

Comparing ./master_artifact/chip-qpg6100-lighting-example.out and ./pull_artifact/chip-qpg6100-lighting-example.out:

sections,vmsize,filesize
.debug_info,0,41908
.debug_abbrev,0,2105
.debug_line,0,1845
.debug_loc,0,1629
.strtab,0,1197
.debug_str,0,733
.symtab,0,608
.text,360,360
.debug_frame,0,236
.debug_ranges,0,184
.debug_aranges,0,96
.bss,40,0
[ELF Program Headers],0,32
.data,4,4
.shstrtab,0,3
.heap,-48,0
[Unmapped],0,-392


@github-actions
Copy link

Size increase report for "nrfconnect-example-build" from a8fa024

File Section File VM
chip-lock.elf text 284 284
chip-lock.elf rodata 72 72
chip-lock.elf bss 0 32
chip-lock.elf init_array 4 4
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize
.debug_info,0,1597
.debug_str,0,654
.debug_loc,0,234
.debug_line,0,115
.debug_frame,0,48
.debug_aranges,0,24
.debug_ranges,0,24

Comparing ./master_artifact/chip-lock.elf and ./pull_artifact/chip-lock.elf:

sections,vmsize,filesize
.debug_info,0,62666
.debug_line,0,5925
.debug_abbrev,0,4405
.debug_loc,0,1710
.strtab,0,1319
.debug_str,0,994
.symtab,0,624
.debug_frame,0,284
text,284,284
.debug_ranges,0,200
.debug_aranges,0,128
rodata,72,72
bss,32,0
init_array,4,4
.shstrtab,0,1


@yufengwangca yufengwangca merged commit fb53b77 into project-chip:master Sep 20, 2021
@github-actions
Copy link

Size increase report for "esp32-example-build" from a8fa024

File Section File VM
chip-all-clusters-app.elf .flash.text 296 296
chip-all-clusters-app.elf .flash.rodata 80 80
chip-all-clusters-app.elf .dram0.bss 0 32
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize
.debug_info,0,34783
.debug_line,0,2044
.debug_abbrev,0,1209
.strtab,0,1204
.debug_loc,0,920
.debug_str,0,838
.flash.text,296,296
.symtab,0,272
.debug_frame,0,236
.debug_ranges,0,144
.debug_aranges,0,96
.flash.rodata,80,80
.dram0.bss,32,0
.riscv.attributes,0,-2
[Unmapped],0,-376


@yufengwangca yufengwangca deleted the pr/cluster/software branch September 20, 2021 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants