mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2026-02-28 20:01:48 +01:00
Created Documentation branch for 25.02
git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2485 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
[[Property:title|Profiler Wizard]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|f3509b1b-8ff1-c385-3bc1-4e800195f8a4]]
|
||||
The profiler wizard lets you analyze the result of a profiling session. It helps you optimize your system by pointing out the features where your system spends most of its time.
|
||||
|
||||
Before using the profiler wizard you must have generated a ''Run-time information record''. A ''Run-time information record'' is generated by a profiler when a program is executed under its control. Most of the time, the ''Run-time information record'' is generated by the profiler integrated into EiffelStudio. See [[Profiling|How to profile a system]] for more information about how to generate a ''Run-time information record'' with the integrated profiler.
|
||||
|
||||
{{note|You can also use a ''Run-time information record'' generated by an external profiler such as GNU's gprof, Pure Atricia's Quantify, Visual C++ profiler, etc. }}
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
The diagram below summarizes the execution steps of the profiler wizard.
|
||||
<br/>
|
||||
[[Image:profiler-process]] <br/>
|
||||
<br/>
|
||||
|
||||
{{seealso|<br/>
|
||||
[[Profiling|How to profile a system]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
[[Property:title|How to set up a Profiler Configuration File]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|0cf0f7bc-1932-fe42-e62d-b37e2e0c424e]]
|
||||
Once executing an instrumented system has generated the proper file, you must have a profile converter process it in order to produce the Execution Profile. The need for the converter comes from the various formats that profilers use to record run-time information during an execution; a simple Profiler Configuration File enables you to describe the format used by any particular profiler.
|
||||
|
||||
The Profiler Configuration File is a file found in the directory $ISE_EIFFEL/studio/profiler where $ISE_EIFFEL is the location of the Eiffel installation. The name of the Profiler Configuration File in that directory is Eiffel for internal profiling and, for external profiling, the name of the profiler tool as specified in the profiler option. EiffelStudio comes with 3 preconfigured external profilers:
|
||||
* '''gprof:''' GNU's gprof
|
||||
* '''win32_ms:''' Visual C++ 5.0 or 6.0
|
||||
* '''profiler.info:''' Pure Atria's Quantify
|
||||
|
||||
The Profiler Configuration File describes the structure of the file generated by the profiler. To create a new Profiler Configuration File for another profiler, just create a new file in the directory $ISE_EIFFEL/studio/profiler and fill it in.
|
||||
|
||||
Here is a complete example showing the various options that maybe specified:
|
||||
<code>number_of_columns: 7
|
||||
-- Number of columns in the file.
|
||||
|
||||
index_column: 1
|
||||
-- Column where the index is stored.
|
||||
|
||||
function_time_column: 3
|
||||
-- Column where the time spent in the function is stored.
|
||||
|
||||
descendent_time_column: 4
|
||||
-- Column where the time spent in the descendents of a function is stored.
|
||||
|
||||
number_of_calls_column: 5
|
||||
-- Column where the number of calls to a function is stored.
|
||||
|
||||
function_name_column: 6
|
||||
-- Column where the name of the function is stored.
|
||||
|
||||
percentage_column: 2
|
||||
-- Column where the percentage of time spent in the function is stored.
|
||||
|
||||
second_percentage_column: 0
|
||||
-- Column where the second percentage of time spent in the function is stored.
|
||||
|
||||
generates_leading_underscore: no
|
||||
-- Says whether the profiler generates leading underscores (yes) or not (no).</code>
|
||||
|
||||
As in Eiffel, -- introduces a comment, which has no effect on the specification. If one of the xxx_column options has a value of 0, this means that the files generated by the given profiler contain no such column. The order of the options is not significant.
|
||||
|
||||
<br/>
|
||||
{{seealso|<br/>
|
||||
[[Select a Run-time information record to generate the Execution Profile|Select a Run-time information record to generate the Execution Profile]] <br/>
|
||||
[[Profiling|How to profile a system]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
[[Property:title|Profiler How To's]]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|f488bd8f-6d05-0487-a4c6-2e26a9a185ad]]
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
[[Property:title|Profiler wizard guided tour]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|e6166282-aa91-e4a9-9951-819f32d50b88]]
|
||||
Using the Profiler Wizard ('''EiffelStudio -> Tools -> Profiler ...''') consists of activities in four "states", each of which is represented by a wizard dialog box:
|
||||
|
||||
# [[Select the Compilation mode|Select which version of your system you ran using the profiler: ''Workbench'' or ''Finalized'']] .
|
||||
# [[Reuse or Generate an Execution Profile|Select an existing ''Execution Profile'' or choose to generate a new ''Execution Profile'' from a ''Run-time information record'' (This step only applies when an ''Execution Profile'' has already been generated for this system)]]
|
||||
# [[Select a Run-time information record to generate the Execution Profile|Generate a new ''Execution Profile'' from a ''Run-time information record'' (This step only applies when generating a new ''Execution Profile'')]]
|
||||
# [[Select the information you need and formulate your query|Select the information you need and formulate your query.]]
|
||||
|
||||
Results of your query are visible in the [[Profile query window|Profile query window]].
|
||||
|
||||
|
||||
{{seealso|<br/>
|
||||
[[Profiling|How to profile a system]] }}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
[[Property:title|Profile query window]]
|
||||
[[Property:weight|4]]
|
||||
[[Property:uuid|1158eeb3-ccf5-8f29-3551-4e511258fa80]]
|
||||
The profile query window displays the results of the query you have formulated in the [[Select the information you need and formulate your query|Final state]] of the Profiler wizard. It also lets you change the sub queries of the current query.
|
||||
|
||||
To add a new sub query to the current query, fill in the text field labeled '''Define new sub query''' (type in ''calls <20'' for example) and click the '''And''' or '''Or''' button. To display the results of the new query click on the '''Update''' button.
|
||||
|
||||
To remove an existing sub query, select it in the '''Active query''' list and click on the '''Inactivate >''' button.
|
||||
|
||||
To activate an existing sub query, select it in the '''Inactive query''' list and click on the '''< Activate''' button.
|
||||
|
||||
To change the operator affecting an existing sub query, select it in either the '''Active query''' or the '''Inactive query''' list and click on the '''Or''' or '''And''' button.
|
||||
|
||||
Click on the '''Save''' button to save the currently displayed results in a text file.
|
||||
|
||||
{{tip|To visualize the result in Microsoft Excel or any other spreadsheet, select the entire text (except the first three lines where the Execution Profile file is specified), copy it and then paste it into Excel. }}
|
||||
<br/>
|
||||
[[Image:profiler-query-window]] <br/>
|
||||
|
||||
{{seealso|<br/>
|
||||
[[Profiling|How to profile a system]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
[[Property:title|Reuse or Generate an Execution Profile]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|caa8ac1d-b17d-6b5b-1b16-7420a8d4404c]]
|
||||
The second screen of the wizard lets you reuse a previously generated ''Execution Profile'' or generate a new ''Execution Profile'' from a ''Run-time information record''.
|
||||
|
||||
The profiler wizard has detected that one or more ''Execution Profiles'' have already been generated for this system in this compilation mode. If you have executed your system after the generation of the existing profile, select '''Generate a profile from Run-time information record''' to create a new ''Execution Profile'' for the newly produced ''Run-time information record''.
|
||||
|
||||
{{note|If you choose '''Generate a profile from Run-time information record''' the generated ''Execution Profile'' will be written into: <br/><br/>''<project_directory>/EIFGENa/target_name/W_CODE/profinfo.pfi'' <br/><br/>if you have selected '''Workbench mode''' in the first step, or into: <br/><br/>''<project_directory>/EIFGENs/target_name/F_CODE/profinfo.pfi'' <br/><br/>if you have selected '''Finalized mode'''. If a file with the same name already exists its content will be destroyed and replaced. }}
|
||||
<br/>
|
||||
|
||||
However, if you have not executed your system since the generation of the last ''Execution Profile'', there is no need to generate a new ''Execution Profile''. If you are in the latter case, select '''Use existing profile''' and choose the last ''Execution Profile'' you have generated.
|
||||
|
||||
{{tip|If you want to archive different ''Execution Profiles'' (to compare them for example), rename the ''profinfo.pfi'' file into a new name but keep the .pfi extension. The profiler wizard detects existing Execution Profiles by checking the file extensions. }}
|
||||
<br/>
|
||||
[[Image:profiler-wizard-second-state]] <br/>
|
||||
<br/>
|
||||
|
||||
Clicking '''Next''' will lead you to the [[Select a Run-time information record to generate the Execution Profile|Third state]] if you have selected '''Generate a profile from Run-time information record'''. On the other hand if you have selected '''Use existing profile''' you will go to the [[Select the information you need and formulate your query|Final state]] .
|
||||
<br/>
|
||||
|
||||
{{seealso|<br/>
|
||||
[[Profiling|How to profile a system]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
[[Property:title|Select the Compilation mode]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|b43f018b-b924-234b-727f-8d80c1d18fb4]]
|
||||
The first screen of the wizard lets you specify the mode in which the profiled system was compiled.
|
||||
|
||||
If you have run a finalized system under the control of the profiler then select '''Finalized mode''' and click '''Next'''. On the contrary if you have executed the system in Workbench mode then select '''Workbench mode''' and click '''Next'''.
|
||||
|
||||
|
||||
[[Image:profiler-wizard-first-state]] <br/>
|
||||
<br/>
|
||||
|
||||
Clicking '''Next''' will lead you to the [[Reuse or Generate an Execution Profile|Second state]] or to the [[Select a Run-time information record to generate the Execution Profile|Third state]] depending on whether an ''Execution Profile'' has already been generated for this compilation mode or not. If no ''Execution Profile'' has been generated so far (which happens the first time you execute this wizard for a specified project in a given compilation mode) you will go to the [[Select a Run-time information record to generate the Execution Profile|Third state]] , otherwise you will go to the [[Reuse or Generate an Execution Profile|Second state]] .
|
||||
<br/>
|
||||
|
||||
{{seealso|<br/>
|
||||
[[Profiling|How to profile a system]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
[[Property:title|Select the information you need and formulate your query]]
|
||||
[[Property:weight|3]]
|
||||
[[Property:uuid|708f745d-11af-4d3d-e857-159dad4bdeec]]
|
||||
The final screen of the wizard lets you select the information you want to be displayed in the profile query window.
|
||||
|
||||
==Select the information you need==
|
||||
|
||||
Check or uncheck any of the check buttons in '''Output switches''' to select the columns you want to be displayed. Each switch turns on or off the corresponding column output. You should toggle columns on or off depending on what you would like to see in the result of the computation. Here are the explanations of each switch:
|
||||
* '''Feature name''': Display the name of the current feature.
|
||||
* '''Number of calls''': Display the number of times the current feature was called during the instrumented execution.
|
||||
* '''Function time''': Display the time spent in the current feature (not counting the time spent in features called by the current feature).
|
||||
* '''Descendant time''': Display the time spent in all features called during the execution of the current feature.
|
||||
* '''Total time''': Display the total time spent in the feature. This value is equal to ''Function time + Descendant time''.
|
||||
* '''Percentage''': Display the percentage of time spent in the current feature. This value is equal to ''Total time / Execution time''.
|
||||
|
||||
Check or uncheck any of the check buttons in the '''Language type''' to select the type of features you want to be displayed. If you select only one language, the query result will not contain any information about routines written in the other language. The default is Eiffel only.
|
||||
* Eiffel features: Display the features written in Eiffel.
|
||||
* C functions: Display the functions written in C.
|
||||
* Recursive functions: Display recursive functions.
|
||||
|
||||
==Formulate your query==
|
||||
|
||||
When running a query, you are able to type a complete query. After pressing the '''Next''' button, a new window will be displayed to show the result of the query. The total query can be either a single one or a set of sub-queries separated by one of the two operators 'or' or 'and'. <br/>
|
||||
<br/>
|
||||
Each sub-query must have the following syntax 'attribute operator value' where:
|
||||
* 'attribute' is one of:
|
||||
** feature name
|
||||
** calls
|
||||
** total
|
||||
** self
|
||||
** descendants
|
||||
** percentage
|
||||
|
||||
* 'operator' is one of: <, >, <=, >=, =, /=, in
|
||||
* 'value' is one of:
|
||||
** An integer (for calls)
|
||||
** A string (for feature name). The string may contain wild card characters: ?, standing for arbitrary characters, and *, standing for arbitrary sub-strings.
|
||||
** A real value (for other attributes)
|
||||
** An interval, of the form a-b for two values a and b.
|
||||
** max
|
||||
** min
|
||||
** avg
|
||||
|
||||
|
||||
<br/>
|
||||
[[Image:profiler-wizard-fourth-state]] <br/>
|
||||
<br/>
|
||||
|
||||
|
||||
Clicking '''Next''' will open the [[Profile query window|Profile query window]] and display the results of the formulated query.
|
||||
<br/>
|
||||
|
||||
{{seealso|<br/>
|
||||
[[Profiling|How to profile a system]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
[[Property:title|Select a Run-time information record to generate the Execution Profile]]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|c3f3e068-2313-ff14-2a33-8bf5297b9779]]
|
||||
The third screen of the wizard lets you generate an ''Execution Profile'' from a ''Run-time information record''. You should provide the ''Run-time information record'' produced by the profiler in the text field labeled '''Run-time information record'''. If the file provided by default is not the desired one change it by clicking on the '''Browse''' button or by directly entering it in the text field.
|
||||
|
||||
Then, in the combo box labeled '''Profiler used to produce the above record''', select the profiler that has been used to produce the ''Run-time information record'' you have entered. If the profiler used to execute the system does not appear in the combo box, you have to add it. See [[How to set up a Profiler Configuration File|How to set up a Profiler Configuration File]] for more details on how to do so.
|
||||
|
||||
|
||||
{{note|The Run-time information record must be located in the ''EIFGENs/target_name/W_code'' directory of your project. }}
|
||||
|
||||
<br/>
|
||||
[[Image:profiler-wizard-third-state]] <br/>
|
||||
<br/>
|
||||
|
||||
|
||||
Clicking '''Next''' will lead you to the [[Select the information you need and formulate your query|Final state]] if the provided ''Run-time information record'' is valid. If the ''Run-time information record'' is not valid or is not located in the ''EIFGENs/target_name/W_code'' directory of the project, you will go to the '''Run-time Information Record Error state''' as shown below.
|
||||
|
||||
|
||||
[[Image:profiler-wizard-rtir-error-state]] <br/>
|
||||
<br/>
|
||||
|
||||
{{seealso|<br/>
|
||||
[[Profiling|How to profile a system]] <br/>
|
||||
[[How to set up a Profiler Configuration File|How to set up a Profiler Configuration File]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user