discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnustep] Edit.app profiled


From: Humasect
Subject: [Discuss-gnustep] Edit.app profiled
Date: Sun, 17 Sep 2000 12:59:04 -0700

Well I was bored, so I decided to profile certain aspects of gstep-gui. I
compiled on a celeron/525 linux machine, with profiling and debugging enabled in
all of gstep-* of course. So I ran Edit.app, and ran my mouse through the app
menu (quite laggy), and these are the gprof results, attachment.

Thoughts?

--Humasect
Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total           
 time   seconds   seconds    calls  Ts/call  Ts/call  name    
 59.15      0.42     0.42                             objc_msg_lookup
 12.68      0.51     0.09                             hash_value_for_key
  4.23      0.54     0.03                             __sel_register_typed_name
  4.23      0.57     0.03                             hash_string
  2.82      0.59     0.02                             get_imp
  2.82      0.61     0.02                             hash_string
  2.82      0.63     0.02                             objc_msg_lookup_super
  2.82      0.65     0.02                             objc_mutex_lock
  1.41      0.66     0.01                             __objc_mutex_lock
  1.41      0.67     0.01                             __objc_thread_id
  1.41      0.68     0.01                             compare_strings
  1.41      0.69     0.01                             compare_strings
  1.41      0.70     0.01                             objc_calloc
  1.41      0.71     0.01                             
register_selectors_from_list
  0.00      0.71     0.00      295     0.00     0.00  data_start
  0.00      0.71     0.00       28     0.00     0.00  
_c_Document__documentForWindow_
  0.00      0.71     0.00        7     0.00     0.00  _i_Document__firstTextView
  0.00      0.71     0.00        3     0.00     0.00  _i_Document__window
  0.00      0.71     0.00        2     0.00     0.00  
_i_Document__setupInitialTextViewSharedState
  0.00      0.71     0.00        1     0.00     0.00  global constructors keyed 
to Controller.mxRxSwe
  0.00      0.71     0.00        1     0.00     0.00  global constructors keyed 
to Document.ma7U1uc
  0.00      0.71     0.00        1     0.00     0.00  global constructors keyed 
to main
  0.00      0.71     0.00        1     0.00     0.00  _i_Document__init
  0.00      0.71     0.00        1     0.00     0.00  
_i_Document__initWithPath_encoding_uniqueZone_
  0.00      0.71     0.00        1     0.00     0.00  _i_Document__isRichText
  0.00      0.71     0.00        1     0.00     0.00  
_i_Document__setDocumentEdited_
  0.00      0.71     0.00        1     0.00     0.00  
_i_Document__setDocumentName_
  0.00      0.71     0.00        1     0.00     0.00  createMenu

 %         the percentage of the total running time of the
time       program used by this function.

cumulative a running sum of the number of seconds accounted
 seconds   for by this function and those listed above it.

 self      the number of seconds accounted for by this
seconds    function alone.  This is the major sort for this
           listing.

calls      the number of times this function was invoked, if
           this function is profiled, else blank.
 
 self      the average number of milliseconds spent in this
ms/call    function per call, if this function is profiled,
           else blank.

 total     the average number of milliseconds spent in this
ms/call    function and its descendents per call, if this 
           function is profiled, else blank.

name       the name of the function.  This is the minor sort
           for this listing. The index shows the location of
           the function in the gprof listing. If the index is
           in parenthesis it shows where it would appear in
           the gprof listing if it were to be printed.

                     Call graph (explanation follows)


granularity: each sample hit covers 4 byte(s) for 1.41% of 0.71 seconds

index % time    self  children    called     name
                                                 <spontaneous>
[1]     59.2    0.42    0.00                 objc_msg_lookup [1]
-----------------------------------------------
                                                 <spontaneous>
[2]     12.7    0.09    0.00                 hash_value_for_key [2]
-----------------------------------------------
                                                 <spontaneous>
[3]      4.2    0.03    0.00                 hash_string [3]
-----------------------------------------------
                                                 <spontaneous>
[4]      4.2    0.03    0.00                 __sel_register_typed_name [4]
-----------------------------------------------
                                                 <spontaneous>
[5]      2.8    0.02    0.00                 get_imp [5]
-----------------------------------------------
                                                 <spontaneous>
[6]      2.8    0.02    0.00                 hash_string [6]
-----------------------------------------------
                                                 <spontaneous>
[7]      2.8    0.02    0.00                 objc_msg_lookup_super [7]
-----------------------------------------------
                                                 <spontaneous>
[8]      2.8    0.02    0.00                 objc_mutex_lock [8]
-----------------------------------------------
                                                 <spontaneous>
[9]      1.4    0.01    0.00                 compare_strings [9]
-----------------------------------------------
                                                 <spontaneous>
[10]     1.4    0.01    0.00                 compare_strings [10]
-----------------------------------------------
                                                 <spontaneous>
[11]     1.4    0.01    0.00                 objc_calloc [11]
-----------------------------------------------
                                                 <spontaneous>
[12]     1.4    0.01    0.00                 register_selectors_from_list [12]
-----------------------------------------------
                                                 <spontaneous>
[13]     1.4    0.01    0.00                 __objc_mutex_lock [13]
-----------------------------------------------
                                                 <spontaneous>
[14]     1.4    0.01    0.00                 __objc_thread_id [14]
-----------------------------------------------
                0.00    0.00       1/295         _i_Document__firstTextView 
[172]
                0.00    0.00       1/295         __objc_send_load [240]
                0.00    0.00       1/295         __objc_send_message_in_list 
[241]
                0.00    0.00       2/295         
_i_Document__initWithPath_encoding_uniqueZone_ [179]
                0.00    0.00       2/295         _i_Document__setDocumentName_ 
[182]
                0.00    0.00       2/295         _i_Document__windowWillClose_ 
[302]
                0.00    0.00       3/295         _i_Document__window [173]
                0.00    0.00       4/295         _i_Document__init [178]
                0.00    0.00       4/295         __objc_forward [208]
                0.00    0.00       6/295         
_i_Document__setupInitialTextViewSharedState [174]
                0.00    0.00       7/295         main [53]
                0.00    0.00      28/295         
_i_Controller__applicationDidFinishLaunching_ [271]
                0.00    0.00      28/295         
_c_Document__documentForWindow_ [171]
                0.00    0.00      30/295         
_i_Controller__applicationShouldTerminate_ [273]
                0.00    0.00      84/295         createMenu [16]
                0.00    0.00      92/295         __objc_send_initialize [239]
[15]     0.0    0.00    0.00     295         data_start [15]
-----------------------------------------------
                0.00    0.00       1/1           main [53]
[16]     0.0    0.00    0.00       1         createMenu [16]
                0.00    0.00      84/295         data_start [15]
-----------------------------------------------
                0.00    0.00      28/28          
_i_Controller__applicationShouldTerminate_ [273]
[171]    0.0    0.00    0.00      28         _c_Document__documentForWindow_ 
[171]
                0.00    0.00      28/295         data_start [15]
-----------------------------------------------
                0.00    0.00       1/7           
_i_Controller__applicationDidFinishLaunching_ [271]
                0.00    0.00       1/7           
_i_Document__initWithPath_encoding_uniqueZone_ [179]
                0.00    0.00       2/7           
_i_Document__setupInitialTextViewSharedState [174]
                0.00    0.00       3/7           _i_Document__window [173]
[172]    0.0    0.00    0.00       7         _i_Document__firstTextView [172]
                0.00    0.00       1/295         data_start [15]
-----------------------------------------------
                0.00    0.00       1/3           _i_Document__setDocumentName_ 
[182]
                0.00    0.00       1/3           
_i_Document__setDocumentEdited_ [181]
                0.00    0.00       1/3           _i_Document__windowWillClose_ 
[302]
[173]    0.0    0.00    0.00       3         _i_Document__window [173]
                0.00    0.00       3/7           _i_Document__firstTextView 
[172]
                0.00    0.00       3/295         data_start [15]
-----------------------------------------------
                0.00    0.00       2/2           _i_Document__init [178]
[174]    0.0    0.00    0.00       2         
_i_Document__setupInitialTextViewSharedState [174]
                0.00    0.00       6/295         data_start [15]
                0.00    0.00       2/7           _i_Document__firstTextView 
[172]
-----------------------------------------------
                0.00    0.00       1/1           __do_global_ctors_aux [186]
[175]    0.0    0.00    0.00       1         global constructors keyed to 
Controller.mxRxSwe [175]
-----------------------------------------------
                0.00    0.00       1/1           __do_global_ctors_aux [186]
[176]    0.0    0.00    0.00       1         global constructors keyed to 
Document.ma7U1uc [176]
-----------------------------------------------
                0.00    0.00       1/1           __do_global_ctors_aux [186]
[177]    0.0    0.00    0.00       1         global constructors keyed to main 
[177]
-----------------------------------------------
                0.00    0.00       1/1           
_i_Document__initWithPath_encoding_uniqueZone_ [179]
[178]    0.0    0.00    0.00       1         _i_Document__init [178]
                0.00    0.00       4/295         data_start [15]
                0.00    0.00       2/2           
_i_Document__setupInitialTextViewSharedState [174]
-----------------------------------------------
                0.00    0.00       1/1           
_i_Controller__applicationDidFinishLaunching_ [271]
[179]    0.0    0.00    0.00       1         
_i_Document__initWithPath_encoding_uniqueZone_ [179]
                0.00    0.00       2/295         data_start [15]
                0.00    0.00       1/1           _i_Document__init [178]
                0.00    0.00       1/7           _i_Document__firstTextView 
[172]
                0.00    0.00       1/1           _i_Document__setDocumentName_ 
[182]
-----------------------------------------------
                0.00    0.00       1/1           _i_Document__setDocumentName_ 
[182]
[180]    0.0    0.00    0.00       1         _i_Document__isRichText [180]
-----------------------------------------------
                0.00    0.00       1/1           _i_Document__textDidChange_ 
[299]
[181]    0.0    0.00    0.00       1         _i_Document__setDocumentEdited_ 
[181]
                0.00    0.00       1/3           _i_Document__window [173]
-----------------------------------------------
                0.00    0.00       1/1           
_i_Document__initWithPath_encoding_uniqueZone_ [179]
[182]    0.0    0.00    0.00       1         _i_Document__setDocumentName_ [182]
                0.00    0.00       2/295         data_start [15]
                0.00    0.00       1/1           _i_Document__isRichText [180]
                0.00    0.00       1/3           _i_Document__window [173]
-----------------------------------------------

 This table describes the call tree of the program, and was sorted by
 the total amount of time spent in each function and its children.

 Each entry in this table consists of several lines.  The line with the
 index number at the left hand margin lists the current function.
 The lines above it list the functions that called this function,
 and the lines below it list the functions this one called.
 This line lists:
     index      A unique number given to each element of the table.
                Index numbers are sorted numerically.
                The index number is printed next to every function name so
                it is easier to look up where the function in the table.

     % time     This is the percentage of the `total' time that was spent
                in this function and its children.  Note that due to
                different viewpoints, functions excluded by options, etc,
                these numbers will NOT add up to 100%.

     self       This is the total amount of time spent in this function.

     children   This is the total amount of time propagated into this
                function by its children.

     called     This is the number of times the function was called.
                If the function called itself recursively, the number
                only includes non-recursive calls, and is followed by
                a `+' and the number of recursive calls.

     name       The name of the current function.  The index number is
                printed after it.  If the function is a member of a
                cycle, the cycle number is printed between the
                function's name and the index number.


 For the function's parents, the fields have the following meanings:

     self       This is the amount of time that was propagated directly
                from the function into this parent.

     children   This is the amount of time that was propagated from
                the function's children into this parent.

     called     This is the number of times this parent called the
                function `/' the total number of times the function
                was called.  Recursive calls to the function are not
                included in the number after the `/'.

     name       This is the name of the parent.  The parent's index
                number is printed after it.  If the parent is a
                member of a cycle, the cycle number is printed between
                the name and the index number.

 If the parents of the function cannot be determined, the word
 `<spontaneous>' is printed in the `name' field, and all the other
 fields are blank.

 For the function's children, the fields have the following meanings:

     self       This is the amount of time that was propagated directly
                from the child into the function.

     children   This is the amount of time that was propagated from the
                child's children to the function.

     called     This is the number of times the function called
                this child `/' the total number of times the child
                was called.  Recursive calls by the child are not
                listed in the number after the `/'.

     name       This is the name of the child.  The child's index
                number is printed after it.  If the child is a
                member of a cycle, the cycle number is printed
                between the name and the index number.

 If there are any cycles (circles) in the call graph, there is an
 entry for the cycle-as-a-whole.  This entry shows who called the
 cycle (as parents) and the members of the cycle (as children.)
 The `+' recursive calls entry shows the number of function calls that
 were internal to the cycle, and the calls entry for each member shows,
 for that member, how many times it was called from other members of
 the cycle.


Index by function name

 [175] global constructors keyed to Controller.mxRxSwe [180] 
_i_Document__isRichText (Document.m) [6] hash_string (NSZone.h)
 [176] global constructors keyed to Document.ma7U1uc [181] 
_i_Document__setDocumentEdited_ (Document.m) [3] hash_string (NSZone.h)
 [177] global constructors keyed to main [182] _i_Document__setDocumentName_ 
(Document.m) [2] hash_value_for_key
  [13] __objc_mutex_lock     [174] _i_Document__setupInitialTextViewSharedState 
(Document.m) [11] objc_calloc
  [14] __objc_thread_id      [173] _i_Document__window (Document.m) [1] 
objc_msg_lookup
   [4] __sel_register_typed_name [9] compare_strings (NSZone.h) [7] 
objc_msg_lookup_super
 [171] _c_Document__documentForWindow_ (Document.m) [10] compare_strings 
(NSZone.h) [8] objc_mutex_lock
 [172] _i_Document__firstTextView (Document.m) [16] createMenu [12] 
register_selectors_from_list (NSZone.h)
 [178] _i_Document__init (Document.m) [15] data_start
 [179] _i_Document__initWithPath_encoding_uniqueZone_ (Document.m) [5] get_imp

reply via email to

[Prev in Thread] Current Thread [Next in Thread]