ZyX wrote:

> Consider the following script:
> ============= test-profileanfunc.vim =============
> let s:d={}
> function Test()
>     function s:d.f()
>         " s:d.f
>     endfunction
>     let d={}
>     function d.f()
>         " d.f
>     endfunction
>     call s:d.f()
>     call d.f()
> endfunction
> profile start anfunc.profile
> profile func *
> call Test()
> profile pause
> qa!
> ==================================================
> Here is the output after launching
>     vim -u NONE -S test-profileanfunc.vim
> :
> ================= anfunc.profile =================
> FUNCTION  1()
> Called 1 time
> Total time:   0.000004
>  Self time:   0.000004
> 
> count  total (s)   self (s)
>                                     " s:d.f
> 
> FUNCTION  Test()
> Called 1 time
> Total time:   0.000095
>  Self time:   0.000088
> 
> count  total (s)   self (s)
>     1              0.000011     function s:d.f()
>                                     " s:d.f
>                                 endfunction
>     1              0.000008     let d={}
>     1              0.000004     function d.f()
>                                     " d.f
>                                 endfunction
>     1   0.000033   0.000029     call s:d.f()
>     1   0.000016   0.000013     call d.f()
> 
> FUNCTIONS SORTED ON TOTAL TIME
> count  total (s)   self (s)  function
>     1   0.000095   0.000088  Test()
>     1   0.000004             1()
> 
> FUNCTIONS SORTED ON SELF TIME
> count  total (s)   self (s)  function
>     1   0.000095   0.000088  Test()
>     1              0.000004  1()
> 
> ==================================================
> You see, it normally profiles s:d.f, but fails to do this for d.f. I actually 
> encountered the opposite issue, but failed to reproduce it with a simple 
> script, 
> so filing this. Tested on vim-7.3.75 from Gentoo repos and on vim-7.3.89 
> (revision 28398206597f, --with-features=huge).

I'll put it in the todo list, but don't expect a solution soon.

-- 
The future isn't what it used to be.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui