How can I get the dump of physical address during execution time?

jeng (jeng@ccit.edu.tw)
Tue, 4 Jan 2000 14:42:36 +0800


Dear all:

I'm tracing the source code of the Linux kernel.

What I want to do is shown as follows.

When I boot the Linux, I want to dump the physical address during whatever
execution time or idle time.

I know that the Linux use paging mechanism to manage the virtual memory.
Now I want to calculate the page consumption of applications.

The address is divided into three portions:

1. The first 10 bits (from the most significant bits) : is used to point
to the page directory entry.

2. The entry in the page directory will point to the starting address of
the page table.

3. The second 10 bits from the most significant bit: is used to point to
the entry in the page table.

4. The entry of the page table will therefore point to the starting
address of a page frame in the physical memory.

5. The last 12 bits will therefore point to the offset from the
aforementioned page frame.

Is there anyone who can tell me where should I modify so that I can see the
physical address during program execution time?

How can I calculate the page consumption of certain applications?

|___10 bits______| + |_______10 bits______| + |_______12 bits_____________|
| |
|
| |
|
| |_______| page |
|
| |_______| directory | page table
|
|---->|___*__|----------------|----->|_______|
|
| |_______|
page frame in |
| |_______|
physical memory |
------>|____*__|----------->|
_______________| |

|_______________| |

|_______________| |

|________________| |

|_physical address__|<--

David

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/