• Home
  • Raw
  • Download

Lines Matching full:the

1 # Copyright 2016 The Chromium OS Authors. All rights reserved.
3 # found in the LICENSE file.
17 # Constants used to identify if a function is common in the pprof and CWP
33 # Separator used to delimit the function from the file name.
38 """Makes the CWP and pprof file names consistent.
40 For the same function, it may happen for some file paths to differ slightly
41 in the CWP data compared to the pprof output. In a file name, for each tuple
42 element of the list, we substitute the first element with the second one.
45 file_name: A string representing the name of the file.
48 A string representing the modified name of tihe file.
58 """Creates the function key from the function and file name.
60 Parsing the the pprof --top and --tree outputs is difficult due to the fact
61 that it hard to extract the function and file name (i.e the function names
63 For the moment, we used FUNCTION_FILE_SEPARATOR as delimiter between the
64 function and the file name. However, there are some cases where the file name
69 function_and_file_name: A string representing the function and the file name
70 as it appears in the pprof output.
73 A string representing the function key, composed from the function and file
80 # In the CWP output, we replace the , with ; as a workaround for parsing
81 # csv files. We do the same for the pprof output.
83 # TODO(evelinad): Use dremel --csv_dialect=excel-tab in the queries for
84 # replacing the , delimiter with tab.
86 # If the function and file name sequence contains the FUNCTION_FILE_SEPARATOR,
87 # we normalize the path name of the file and make the string subtitutions
88 # to make the CWP and pprof data consistent. The returned key is composed
89 # from the function name and normalized file path name, separated by a comma.
90 # If the function and file name does not contain the FUNCTION_FILE_SEPARATOR,
91 # we just do the strings substitution.
103 """Computes the cumulative inclusive count value of a function.
106 computing the fraction of the inclusive count value from a child function to
107 the parent function, we take into consideration the sum of the
109 count values from all the ocurences of that function.
112 cwp_inclusive_count_statistics: A dict containing the inclusive count
113 statistics extracted by the ParseCWPInclusiveCountFile method.
116 A dict having as a ket the name of the function and as a value the sum of
117 the inclusive count values of the occurences of the functions from all
118 the files and objects.
132 """Computes the fractions of the inclusive count values for child functions.
134 The fraction represents the inclusive count value of a child function over
135 the one of the parent function.
138 cwp_inclusive_count_statistics_cumulative: A dict containing the
139 cumulative inclusive count values of the CWP functions.
140 cwp_pairwise_inclusive_count_statistics: A dict containing the inclusive
141 count statistics for pairs of parent and child functions. The key is the
142 parent function. The value is a dict with the key the name of the child
143 function and the file name, comma separated, and the value is the
144 inclusive count value of the pair of parent and child functions.
147 A dict containing the inclusive count statistics for pairs of parent
148 and child functions. The key is the parent function. The value is a
149 dict with the key the name of the child function and the file name,
150 comma separated, and the value is the inclusive count fraction of the
151 child function out of the parent function.
177 """Parses the contents of the function groups file.
180 cwp_function_groups_lines: A list of the lines contained in the CWP
181 function groups file. A line contains the group name and the file path
182 that describes the group, separated by a space.
185 A list of tuples containing the group name and the file path.
187 # The order of the groups mentioned in the cwp_function_groups file
188 # matters. A function declared in a file will belong to the first
189 # mentioned group that matches its path to the one of the file.
190 # It is possible to have multiple paths that belong to the same group.
195 """Parses a file that contains the output of the pprof --top command.
198 file_name: The name of the file containing the pprof --top output.
201 A dict having as a key the name of the function and the file containing
202 the declaration of the function, separated by a comma, and as a value
203 a tuple containing the flat, flat percentage, sum percentage, cummulative
209 # In the pprof top output, the statistics of the functions start from the
228 """Parses a file that contains the output of the pprof --tree command.
231 file_name: The name of the file containing the pprof --tree output.
234 A dict including the statistics for pairs of parent and child functions.
235 The key is the name of the parent function and the file where the
236 function is declared, separated by a comma. The value is a dict having as
237 a key the name of the child function and the file where the function is
238 delcared, comma separated and as a value the percentage of time the
239 parent function spends in the child function.
242 # In the pprof output, the statistics of the functions start from the 9th
250 # The statistics of a given function, its parent and child functions are
252 # All the parent function statistics are above the line containing the
253 # statistics of the given function.
254 # All the statistics of a child function are below the statistics of the
256 # The statistics of a parent or a child function contain the calls, calls
257 # percentage, the function name and the file where the function is declared.
258 # The statistics of the given function contain the flat, flat percentage,
259 # sum percentage, cummulative, cummulative percentage, function name and the
260 # name of the file containing the declaration of the function.
299 """Parses the CWP inclusive count files.
301 A line should contain the name of the function, the file name with the
302 declaration, the inclusive count and inclusive count fraction out of the
306 file_name: The file containing the inclusive count values of the CWP
310 A dict containing the inclusive count statistics. The key is the name of
311 the function and the file name, comma separated. The value represents a
312 tuple with the object name containing the function declaration, the
314 identify if the function is present in one of the benchmark profiles.
328 # We ignore the lines that have empty fields(i.e they specify only the
329 # addresses of the functions and the inclusive counts values).
337 # or objects. Such situations can occur when in the Dremel queries there
338 # are not specified the Chrome OS version and the name of the board (i.e
339 # the files can belong to different kernel or library versions).
346 # All the functions are initially marked as EXTRA_FUNCTION.
356 """Parses the CWP pairwise inclusive count files.
358 A line of the file should contain a pair of a parent and a child function,
359 concatenated by the PARENT_CHILD_FUNCTIONS_SEPARATOR, the name of the file
360 where the child function is declared and the inclusive count fractions of
361 the pair of functions out of the total amount of inclusive count values.
364 file_name: The file containing the pairwise inclusive_count statistics of
365 the
369 A dict containing the statistics of the parent functions and each of
370 their child functions. The key of the dict is the name of the parent
371 function. The value is a dict having as a key the name of the child
372 function with its file name separated by a ',' and as a value the
373 inclusive count value of the parent-child function pair.
389 # multiple files or objects. Such situations can occur when in the
390 # Dremel queries are not specified the Chrome OS version and the
391 # name of the board (i.e the files can belong to different kernel or
392 # library versions), when the child function is a template function