resource: process: Set attributes as always supported 18/272618/1 submit/tizen/20220322.020653
authorDongwoo Lee <dwoo08.lee@samsung.com>
Tue, 22 Mar 2022 01:22:46 +0000 (10:22 +0900)
committerDongwoo Lee <dwoo08.lee@samsung.com>
Tue, 22 Mar 2022 01:22:46 +0000 (10:22 +0900)
To support skeleton process resource driver which is representing
process on demand, it should be possible to set interesting attributes
list before set controls. To this end, all attributes in process is
now set to always supported.

Change-Id: Ib595d9093b90c860d9f8fb3922d1d295a9957af8
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
src/resource/resource-process.c

index 8baf5dc529b3b7ef8f43631adf8832e66631e8db..0e050afc38862c2bead994c5c9769ffbc393d6bd 100644 (file)
@@ -219,6 +219,7 @@ static const struct resource_attribute process_attrs[] = {
                .type   = DATA_TYPE_DOUBLE,
                .ops    = {
                        .get = process_get_cpu_util,
+                       .is_supported = resource_attr_supported_always,
                },
        }, {
                .name   = "PROCESS_ATTR_MEM_VIRT",
@@ -226,6 +227,7 @@ static const struct resource_attribute process_attrs[] = {
                .type   = DATA_TYPE_UINT64,
                .ops    = {
                        .get = process_get_mem_virt,
+                       .is_supported = resource_attr_supported_always,
                },
        }, {
                .name   = "PROCESS_ATTR_MEM_RSS",
@@ -233,6 +235,7 @@ static const struct resource_attribute process_attrs[] = {
                .type   = DATA_TYPE_UINT64,
                .ops    = {
                        .get = process_get_mem_rss,
+                       .is_supported = resource_attr_supported_always,
                },
        }, {
                .name   = "PROCESS_ATTR_MEM_RSS_PERCENT",
@@ -240,6 +243,7 @@ static const struct resource_attribute process_attrs[] = {
                .type   = DATA_TYPE_DOUBLE,
                .ops    = {
                        .get = process_get_mem_rss,
+                       .is_supported = resource_attr_supported_always,
                },
        }, {
                .name   = "PROCESS_ATTR_DISK_READ_BPS",
@@ -247,6 +251,7 @@ static const struct resource_attribute process_attrs[] = {
                .type   = DATA_TYPE_UINT,
                .ops    = {
                        .get = process_get_disk_bps,
+                       .is_supported = resource_attr_supported_always,
                },
        }, {
                .name   = "PROCESS_ATTR_DISK_WRITE_BPS",
@@ -254,6 +259,7 @@ static const struct resource_attribute process_attrs[] = {
                .type   = DATA_TYPE_UINT,
                .ops    = {
                        .get = process_get_disk_bps,
+                       .is_supported = resource_attr_supported_always,
                },
        }, {
                .name   = "PROCESS_ATTR_COMM",
@@ -261,6 +267,7 @@ static const struct resource_attribute process_attrs[] = {
                .type   = DATA_TYPE_STRING,
                .ops    = {
                        .get = process_get_context_data,
+                       .is_supported = resource_attr_supported_always,
                },
        }, {
                .name   = "PROCESS_ATTR_PGID",
@@ -268,6 +275,7 @@ static const struct resource_attribute process_attrs[] = {
                .type   = DATA_TYPE_INT,
                .ops    = {
                        .get = process_get_context_data,
+                       .is_supported = resource_attr_supported_always,
                },
        }, {
                .name   = "PROCESS_ATTR_PPID",
@@ -275,6 +283,7 @@ static const struct resource_attribute process_attrs[] = {
                .type   = DATA_TYPE_INT,
                .ops    = {
                        .get = process_get_context_data,
+                       .is_supported = resource_attr_supported_always,
                },
        },
 };