util: resource: Allocate storage for attribute data at set interest 59/272159/3
authorDongwoo Lee <dwoo08.lee@samsung.com>
Thu, 10 Mar 2022 11:32:21 +0000 (20:32 +0900)
committerDongwoo Lee <dwoo08.lee@samsung.com>
Fri, 11 Mar 2022 05:50:19 +0000 (14:50 +0900)
commit99870d8f63e9794f933bfb1d566ec7d27a982538
treedd12390a9ca024ab073c7482ee72df7ea5573bce
parent069a78cd05a00d389768c415226466bbe8242e7a
util: resource: Allocate storage for attribute data at set interest

This introduces the new way to using attribute value. Instead of
allocate memory for each attribute value by driver-self, memory is
allocated when client sets interest for each attribute. This can
prevent from unnecessary memory allocation by deferring until it is
really required.

Change-Id: Ie6d47db4c6735510a0e784f8c254705c2c176b25
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
include/util/resource.h
lib/tmonitor/tmonitor.h
src/resource/resource-battery.c
src/resource/resource-bus.c
src/resource/resource-cpu.c
src/resource/resource-display.c
src/resource/resource-gpu.c
src/resource/resource-memory.c
src/resource/resource-process.c
src/resource/resource-system.c
src/util/resource.c