MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / _dfs_aspace_dump

Function _dfs_aspace_dump

components/dfs/dfs_v2/src/dfs_pcache.c:837–870  ·  view source on GitHub ↗

* @brief Dump address space page information for debugging * * This function prints detailed information about pages in the given address space. * It can optionally filter to show only dirty pages or all pages. * * @param[in] aspace Pointer to the address space to dump * @param[in] is_dirty Flag indicating whether to show only dirty pages (1) or all pages (0) * * @return Always returns

Source from the content-addressed store, hash-verified

835 * @return Always returns 0
836 */
837static int _dfs_aspace_dump(struct dfs_aspace *aspace, int is_dirty)
838{
839 if (aspace)
840 {
841 rt_list_t *next;
842 struct dfs_page *page;
843
844 dfs_aspace_lock(aspace);
845 if (aspace->pages_count > 0)
846 {
847 rt_list_for_each(next, &aspace->list_inactive)
848 {
849 if (next != &aspace->list_active)
850 {
851 page = rt_list_entry(next, struct dfs_page, space_node);
852 if (is_dirty && page->is_dirty)
853 {
854 rt_kprintf(" pages >> fpos: %d index :%d is_dirty: %d\n", page->fpos, page->fpos / ARCH_PAGE_SIZE, page->is_dirty);
855 }
856 else if (is_dirty == 0)
857 {
858 rt_kprintf(" pages >> fpos: %d index :%d is_dirty: %d\n", page->fpos, page->fpos / ARCH_PAGE_SIZE, page->is_dirty);
859 }
860 }
861 }
862 }
863 else
864 {
865 rt_kprintf(" pages >> empty\n");
866 }
867 dfs_aspace_unlock(aspace);
868 }
869 return 0;
870}
871
872/**
873 * @brief Dump page cache information for debugging purposes

Callers 1

dfs_pcache_dumpFunction · 0.85

Calls 3

dfs_aspace_lockFunction · 0.85
rt_kprintfFunction · 0.85
dfs_aspace_unlockFunction · 0.85

Tested by

no test coverage detected