DBA Data[Home] [Help]

PACKAGE: SYS.DBMS_HPROF

Source


1 PACKAGE dbms_hprof AUTHID CURRENT_USER IS
2 
3    PROCEDURE start_profiling(location  VARCHAR2    DEFAULT NULL,
4                              filename  VARCHAR2    DEFAULT NULL,
5                              max_depth PLS_INTEGER DEFAULT NULL,
6                              profile_uga BOOLEAN   DEFAULT NULL,
7                              profile_pga BOOLEAN   DEFAULT NULL
8                             );
9    /* DESCRIPTION:
10         Start profiling at this point and collect profile information in the
11         specified location.
12 
13       ARGUMENTS
14         location -
15           The name of a directory object. The filesystem directory mapped to
16           this directory object is where the raw profiler output is generated.
17 
18         filename -
19           The output filename for the raw profiler data.
20 
21         max_depth -
22           By default (when max_depth value is NULL) profile information is
23           gathered for all functions irrespective of their call depth.  When a
24           non-NULL value is specified for max_depth, the profiler collects
25           data only for functions up to a call depth level of max_depth.
26           [Note: Even though the profiler does not individually track functions
27           at depth greater than max_depth, the time spent in such functions is
28           charged to the ancestor function at depth max_depth.] This can be
29           used for collecting coarse grain profile information. For example, if
30           all that is needed is a high level overview of the subtree times
31           spent under the top level functions and not much detailed drill down
32           analysis is required, then the max_depth could be set at 1.
33 
34         profile_uga -
35           Profile session memory usage (undocumented, for internal use only)
36 
37         profile_pga -
38           Profile process memory usage (undocumented, for internal use only)
39 
40       EXCEPTION
41         invalid filename
42         invalid directory object
43         incorrect directory permission
44         invalid maxdepth
45    */
46 
47    PROCEDURE stop_profiling;
48 
49    /* DESCRIPTION
50         Stop profiler data collection in the user's session.
51         This function also has the side effect of flushing data collected so
52         far in the session, and it signals the end of a run.
53 
54       ARGUMENTS
55         None.
56 
57       EXCEPTION
58         None.
59    */
60 
61    FUNCTION  analyze(location          VARCHAR2,
62                      filename          VARCHAR2,
63                      summary_mode      BOOLEAN     DEFAULT FALSE,
64                      trace             VARCHAR2    DEFAULT NULL,
65                      skip              PLS_INTEGER DEFAULT 0,
66                      collect           PLS_INTEGER DEFAULT NULL,
67                      run_comment       VARCHAR2    DEFAULT NULL,
68                      profile_uga       BOOLEAN     DEFAULT NULL,
69                      profile_pga       BOOLEAN     DEFAULT NULL
70                     ) RETURN NUMBER;
71    /* DESCRIPTION:
72       This function analyzes the raw profiler output and produces hierarchical
73       profiler information in database tables.
74       [Note: Use the dbmshptab.sql script located in the rdbms/admin directory
75        to create the hierarchical profiler database tables and other data
76        structures required for persistently storing the profiler data.]
77 
78       ARGUMENTS:
79       location -
80         The name of a directory object. The raw profiler data file is
81         read from the filesystem directory mapped to this directory
82         object. Output files are written to this directory as well.
83 
84       filename -
85         Name of the raw profiler data file to be analyzed.
86 
87       summary_mode -
88         By default (when "summary_mode" is FALSE), the full analysis is done.
89         When "summary_mode" is TRUE, only top level summary information is
90         generated into the database tables.
91 
92       trace -
93         Analyze only the subtrees rooted at the specified "trace" entry.
94         By default (when "trace" is NULL), the analysis/reporting is generated
95         for the entire run.  The "trace" entry must be specified in the
96         qualified format as in for example, "HR"."PKG"."FOO".  [If multiple
97         overloads exist for the specified name, all of them will be analyzed.]
98 
99       skip -
100         Used only when "trace" is specified.  Analyze only the subtrees rooted
101         at the specified "trace", but ignore the first "skip" invocations to
102         "trace".
103         The default value for "skip" is 0.
104 
105       collect -
106         Used only when "trace" is specified.  Analyze "collect" number of
107         invocations of "trace" (starting from "skip"+1'th invocation).
108         By default only 1 invocation is collected.
109 
110       run_comment -
111         User provided comment for this run.
112 
113       profile_uga -
114         Report UGA usage
115 
116       profile_pga -
117         Report PGA usage
118 
119       RETURN
120         Unique run identifier from dbmshp_runnumber sequence for this run of
121         the analyzer.
122 
123       EXCEPTION
124         invalid filename
125         invalid directory object
126         incorrect directory permission
127    */
128 
129 END dbms_hprof;