What are you using in dtrace to count page faults? 

max

love_code meta wrote:
> Hi All
>  
> Now I 'm testing mmap function, and my pagesize is 4k bytes.  After 
> mapping 8k virtual memory, by dtrace I find there is only one 
> pagefault when I access memory like that s[0] , s[4096].
>  
> The following is my test spteps.
> 1. fd = open("/var/tmp/mmap.file", O_RDWR);
> 2. I'm sure fd is validate. then  
>     s = (char *)mmap(NULL, 8192,
>      PROT_READ | PROT_WRITE,
>       MAP_PRIVATE,
>      fd, 0L);
> 3. for (i =0; i < 8192; i +=4096)
>             a=s[i];
>  
> Based on my knowledge, the step 3 should has two pagefault traps. 
> because our pagesize is 4k, correct? 
>  
>  
> Thanks,
> Ma Ling
>
>
> ------------------------------------------------------------------------
> Tonight's top picks. What will you watch tonight? Preview the hottest 
> shows 
> <http://us.rd.yahoo.com/tv/mail/tagline/tonightspicks/evt=48220/*http://tv.yahoo.com/%20>
>  
> on Yahoo! TV.
> ------------------------------------------------------------------------
>
> _______________________________________________
> perf-discuss mailing list
> perf-discuss@opensolaris.org

_______________________________________________
perf-discuss mailing list
perf-discuss@opensolaris.org

Reply via email to