- char *name = procfile_lineword(ff, l, 0);
- char * value = procfile_lineword(ff, l, 1);
- if(unlikely(!name || !*name || !value || !*value)) continue;
-
- uint32_t hash = simple_hash(name);
-
- if(unlikely(0)) ;
- // else if(unlikely(hash == hash_allocstall_dma32 && strcmp(name, "allocstall_dma32") == 0)) allocstall_dma32 = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_allocstall_dma && strcmp(name, "allocstall_dma") == 0)) allocstall_dma = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_allocstall_movable && strcmp(name, "allocstall_movable") == 0)) allocstall_movable = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_allocstall_normal && strcmp(name, "allocstall_normal") == 0)) allocstall_normal = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_balloon_deflate && strcmp(name, "balloon_deflate") == 0)) balloon_deflate = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_balloon_inflate && strcmp(name, "balloon_inflate") == 0)) balloon_inflate = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_balloon_migrate && strcmp(name, "balloon_migrate") == 0)) balloon_migrate = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_compact_daemon_wake && strcmp(name, "compact_daemon_wake") == 0)) compact_daemon_wake = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_compact_fail && strcmp(name, "compact_fail") == 0)) compact_fail = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_compact_free_scanned && strcmp(name, "compact_free_scanned") == 0)) compact_free_scanned = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_compact_isolated && strcmp(name, "compact_isolated") == 0)) compact_isolated = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_compact_migrate_scanned && strcmp(name, "compact_migrate_scanned") == 0)) compact_migrate_scanned = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_compact_stall && strcmp(name, "compact_stall") == 0)) compact_stall = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_compact_success && strcmp(name, "compact_success") == 0)) compact_success = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_drop_pagecache && strcmp(name, "drop_pagecache") == 0)) drop_pagecache = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_drop_slab && strcmp(name, "drop_slab") == 0)) drop_slab = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_htlb_buddy_alloc_fail && strcmp(name, "htlb_buddy_alloc_fail") == 0)) htlb_buddy_alloc_fail = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_htlb_buddy_alloc_success && strcmp(name, "htlb_buddy_alloc_success") == 0)) htlb_buddy_alloc_success = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_kswapd_high_wmark_hit_quickly && strcmp(name, "kswapd_high_wmark_hit_quickly") == 0)) kswapd_high_wmark_hit_quickly = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_kswapd_inodesteal && strcmp(name, "kswapd_inodesteal") == 0)) kswapd_inodesteal = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_kswapd_low_wmark_hit_quickly && strcmp(name, "kswapd_low_wmark_hit_quickly") == 0)) kswapd_low_wmark_hit_quickly = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_active_anon && strcmp(name, "nr_active_anon") == 0)) nr_active_anon = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_active_file && strcmp(name, "nr_active_file") == 0)) nr_active_file = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_anon_pages && strcmp(name, "nr_anon_pages") == 0)) nr_anon_pages = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_anon_transparent_hugepages && strcmp(name, "nr_anon_transparent_hugepages") == 0)) nr_anon_transparent_hugepages = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_bounce && strcmp(name, "nr_bounce") == 0)) nr_bounce = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_dirtied && strcmp(name, "nr_dirtied") == 0)) nr_dirtied = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_dirty_background_threshold && strcmp(name, "nr_dirty_background_threshold") == 0)) nr_dirty_background_threshold = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_dirty && strcmp(name, "nr_dirty") == 0)) nr_dirty = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_dirty_threshold && strcmp(name, "nr_dirty_threshold") == 0)) nr_dirty_threshold = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_file_pages && strcmp(name, "nr_file_pages") == 0)) nr_file_pages = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_free_cma && strcmp(name, "nr_free_cma") == 0)) nr_free_cma = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_free_pages && strcmp(name, "nr_free_pages") == 0)) nr_free_pages = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_inactive_anon && strcmp(name, "nr_inactive_anon") == 0)) nr_inactive_anon = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_inactive_file && strcmp(name, "nr_inactive_file") == 0)) nr_inactive_file = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_isolated_anon && strcmp(name, "nr_isolated_anon") == 0)) nr_isolated_anon = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_isolated_file && strcmp(name, "nr_isolated_file") == 0)) nr_isolated_file = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_kernel_stack && strcmp(name, "nr_kernel_stack") == 0)) nr_kernel_stack = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_mapped && strcmp(name, "nr_mapped") == 0)) nr_mapped = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_mlock && strcmp(name, "nr_mlock") == 0)) nr_mlock = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_pages_scanned && strcmp(name, "nr_pages_scanned") == 0)) nr_pages_scanned = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_page_table_pages && strcmp(name, "nr_page_table_pages") == 0)) nr_page_table_pages = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_shmem_hugepages && strcmp(name, "nr_shmem_hugepages") == 0)) nr_shmem_hugepages = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_shmem_pmdmapped && strcmp(name, "nr_shmem_pmdmapped") == 0)) nr_shmem_pmdmapped = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_shmem && strcmp(name, "nr_shmem") == 0)) nr_shmem = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_slab_reclaimable && strcmp(name, "nr_slab_reclaimable") == 0)) nr_slab_reclaimable = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_slab_unreclaimable && strcmp(name, "nr_slab_unreclaimable") == 0)) nr_slab_unreclaimable = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_unevictable && strcmp(name, "nr_unevictable") == 0)) nr_unevictable = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_unstable && strcmp(name, "nr_unstable") == 0)) nr_unstable = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_vmscan_immediate_reclaim && strcmp(name, "nr_vmscan_immediate_reclaim") == 0)) nr_vmscan_immediate_reclaim = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_vmscan_write && strcmp(name, "nr_vmscan_write") == 0)) nr_vmscan_write = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_writeback && strcmp(name, "nr_writeback") == 0)) nr_writeback = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_writeback_temp && strcmp(name, "nr_writeback_temp") == 0)) nr_writeback_temp = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_written && strcmp(name, "nr_written") == 0)) nr_written = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_zone_active_anon && strcmp(name, "nr_zone_active_anon") == 0)) nr_zone_active_anon = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_zone_active_file && strcmp(name, "nr_zone_active_file") == 0)) nr_zone_active_file = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_zone_inactive_anon && strcmp(name, "nr_zone_inactive_anon") == 0)) nr_zone_inactive_anon = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_zone_inactive_file && strcmp(name, "nr_zone_inactive_file") == 0)) nr_zone_inactive_file = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_zone_unevictable && strcmp(name, "nr_zone_unevictable") == 0)) nr_zone_unevictable = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_zone_write_pending && strcmp(name, "nr_zone_write_pending") == 0)) nr_zone_write_pending = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_nr_zspages && strcmp(name, "nr_zspages") == 0)) nr_zspages = strtoull(value, NULL, 10);
- else if(unlikely(hash == hash_numa_foreign && strcmp(name, "numa_foreign") == 0)) numa_foreign = strtoull(value, NULL, 10);
- else if(unlikely(hash == hash_numa_hint_faults_local && strcmp(name, "numa_hint_faults_local") == 0)) numa_hint_faults_local = strtoull(value, NULL, 10);
- else if(unlikely(hash == hash_numa_hint_faults && strcmp(name, "numa_hint_faults") == 0)) numa_hint_faults = strtoull(value, NULL, 10);
- //else if(unlikely(hash == hash_numa_hit && strcmp(name, "numa_hit") == 0)) numa_hit = strtoull(value, NULL, 10);
- else if(unlikely(hash == hash_numa_huge_pte_updates && strcmp(name, "numa_huge_pte_updates") == 0)) numa_huge_pte_updates = strtoull(value, NULL, 10);
- else if(unlikely(hash == hash_numa_interleave && strcmp(name, "numa_interleave") == 0)) numa_interleave = strtoull(value, NULL, 10);
- else if(unlikely(hash == hash_numa_local && strcmp(name, "numa_local") == 0)) numa_local = strtoull(value, NULL, 10);
- //else if(unlikely(hash == hash_numa_miss && strcmp(name, "numa_miss") == 0)) numa_miss = strtoull(value, NULL, 10);
- else if(unlikely(hash == hash_numa_other && strcmp(name, "numa_other") == 0)) numa_other = strtoull(value, NULL, 10);
- else if(unlikely(hash == hash_numa_pages_migrated && strcmp(name, "numa_pages_migrated") == 0)) numa_pages_migrated = strtoull(value, NULL, 10);
- else if(unlikely(hash == hash_numa_pte_updates && strcmp(name, "numa_pte_updates") == 0)) numa_pte_updates = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_pageoutrun && strcmp(name, "pageoutrun") == 0)) pageoutrun = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_pgactivate && strcmp(name, "pgactivate") == 0)) pgactivate = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_pgalloc_dma32 && strcmp(name, "pgalloc_dma32") == 0)) pgalloc_dma32 = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_pgalloc_dma && strcmp(name, "pgalloc_dma") == 0)) pgalloc_dma = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_pgalloc_movable && strcmp(name, "pgalloc_movable") == 0)) pgalloc_movable = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_pgalloc_normal && strcmp(name, "pgalloc_normal") == 0)) pgalloc_normal = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_pgdeactivate && strcmp(name, "pgdeactivate") == 0)) pgdeactivate = strtoull(value, NULL, 10);
- else if(unlikely(hash == hash_pgfault && strcmp(name, "pgfault") == 0)) pgfault = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_pgfree && strcmp(name, "pgfree") == 0)) pgfree = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_pginodesteal && strcmp(name, "pginodesteal") == 0)) pginodesteal = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_pglazyfreed && strcmp(name, "pglazyfreed") == 0)) pglazyfreed = strtoull(value, NULL, 10);
- else if(unlikely(hash == hash_pgmajfault && strcmp(name, "pgmajfault") == 0)) pgmajfault = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_pgmigrate_fail && strcmp(name, "pgmigrate_fail") == 0)) pgmigrate_fail = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_pgmigrate_success && strcmp(name, "pgmigrate_success") == 0)) pgmigrate_success = strtoull(value, NULL, 10);
- else if(unlikely(hash == hash_pgpgin && strcmp(name, "pgpgin") == 0)) pgpgin = strtoull(value, NULL, 10);
- else if(unlikely(hash == hash_pgpgout && strcmp(name, "pgpgout") == 0)) pgpgout = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_pgrefill && strcmp(name, "pgrefill") == 0)) pgrefill = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_pgrotated && strcmp(name, "pgrotated") == 0)) pgrotated = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_pgscan_direct && strcmp(name, "pgscan_direct") == 0)) pgscan_direct = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_pgscan_direct_throttle && strcmp(name, "pgscan_direct_throttle") == 0)) pgscan_direct_throttle = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_pgscan_kswapd && strcmp(name, "pgscan_kswapd") == 0)) pgscan_kswapd = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_pgskip_dma32 && strcmp(name, "pgskip_dma32") == 0)) pgskip_dma32 = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_pgskip_dma && strcmp(name, "pgskip_dma") == 0)) pgskip_dma = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_pgskip_movable && strcmp(name, "pgskip_movable") == 0)) pgskip_movable = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_pgskip_normal && strcmp(name, "pgskip_normal") == 0)) pgskip_normal = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_pgsteal_direct && strcmp(name, "pgsteal_direct") == 0)) pgsteal_direct = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_pgsteal_kswapd && strcmp(name, "pgsteal_kswapd") == 0)) pgsteal_kswapd = strtoull(value, NULL, 10);
- else if(unlikely(hash == hash_pswpin && strcmp(name, "pswpin") == 0)) pswpin = strtoull(value, NULL, 10);
- else if(unlikely(hash == hash_pswpout && strcmp(name, "pswpout") == 0)) pswpout = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_slabs_scanned && strcmp(name, "slabs_scanned") == 0)) slabs_scanned = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_thp_collapse_alloc_failed && strcmp(name, "thp_collapse_alloc_failed") == 0)) thp_collapse_alloc_failed = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_thp_collapse_alloc && strcmp(name, "thp_collapse_alloc") == 0)) thp_collapse_alloc = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_thp_deferred_split_page && strcmp(name, "thp_deferred_split_page") == 0)) thp_deferred_split_page = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_thp_fault_alloc && strcmp(name, "thp_fault_alloc") == 0)) thp_fault_alloc = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_thp_fault_fallback && strcmp(name, "thp_fault_fallback") == 0)) thp_fault_fallback = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_thp_file_alloc && strcmp(name, "thp_file_alloc") == 0)) thp_file_alloc = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_thp_file_mapped && strcmp(name, "thp_file_mapped") == 0)) thp_file_mapped = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_thp_split_page_failed && strcmp(name, "thp_split_page_failed") == 0)) thp_split_page_failed = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_thp_split_page && strcmp(name, "thp_split_page") == 0)) thp_split_page = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_thp_split_pmd && strcmp(name, "thp_split_pmd") == 0)) thp_split_pmd = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_thp_zero_page_alloc_failed && strcmp(name, "thp_zero_page_alloc_failed") == 0)) thp_zero_page_alloc_failed = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_thp_zero_page_alloc && strcmp(name, "thp_zero_page_alloc") == 0)) thp_zero_page_alloc = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_unevictable_pgs_cleared && strcmp(name, "unevictable_pgs_cleared") == 0)) unevictable_pgs_cleared = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_unevictable_pgs_culled && strcmp(name, "unevictable_pgs_culled") == 0)) unevictable_pgs_culled = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_unevictable_pgs_mlocked && strcmp(name, "unevictable_pgs_mlocked") == 0)) unevictable_pgs_mlocked = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_unevictable_pgs_munlocked && strcmp(name, "unevictable_pgs_munlocked") == 0)) unevictable_pgs_munlocked = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_unevictable_pgs_rescued && strcmp(name, "unevictable_pgs_rescued") == 0)) unevictable_pgs_rescued = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_unevictable_pgs_scanned && strcmp(name, "unevictable_pgs_scanned") == 0)) unevictable_pgs_scanned = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_unevictable_pgs_stranded && strcmp(name, "unevictable_pgs_stranded") == 0)) unevictable_pgs_stranded = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_workingset_activate && strcmp(name, "workingset_activate") == 0)) workingset_activate = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_workingset_nodereclaim && strcmp(name, "workingset_nodereclaim") == 0)) workingset_nodereclaim = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_workingset_refault && strcmp(name, "workingset_refault") == 0)) workingset_refault = strtoull(value, NULL, 10);
- // else if(unlikely(hash == hash_zone_reclaim_failed && strcmp(name, "zone_reclaim_failed") == 0)) zone_reclaim_failed = strtoull(value, NULL, 10);