diff options
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index ddf5fedb83..577d808511 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -1798,8 +1798,6 @@ class Parser(multiprocessing.Process): | |||
1798 | finally: | 1798 | finally: |
1799 | logfile = "profile-parse-%s.log" % multiprocessing.current_process().name | 1799 | logfile = "profile-parse-%s.log" % multiprocessing.current_process().name |
1800 | prof.dump_stats(logfile) | 1800 | prof.dump_stats(logfile) |
1801 | bb.utils.process_profilelog(logfile) | ||
1802 | print("Raw profiling information saved to %s and processed statistics to %s.processed" % (logfile, logfile)) | ||
1803 | 1801 | ||
1804 | def realrun(self): | 1802 | def realrun(self): |
1805 | if self.init: | 1803 | if self.init: |
@@ -1869,6 +1867,7 @@ class CookerParser(object): | |||
1869 | self.current = 0 | 1867 | self.current = 0 |
1870 | self.num_processes = int(self.cfgdata.getVar("BB_NUMBER_PARSE_THREADS", True) or | 1868 | self.num_processes = int(self.cfgdata.getVar("BB_NUMBER_PARSE_THREADS", True) or |
1871 | multiprocessing.cpu_count()) | 1869 | multiprocessing.cpu_count()) |
1870 | self.process_names = [] | ||
1872 | 1871 | ||
1873 | self.bb_cache = bb.cache.Cache(self.cfgdata, self.cfghash, cooker.caches_array) | 1872 | self.bb_cache = bb.cache.Cache(self.cfgdata, self.cfghash, cooker.caches_array) |
1874 | self.fromcache = [] | 1873 | self.fromcache = [] |
@@ -1904,6 +1903,7 @@ class CookerParser(object): | |||
1904 | for i in range(0, self.num_processes): | 1903 | for i in range(0, self.num_processes): |
1905 | parser = Parser(self.jobs, self.result_queue, self.parser_quit, init, self.cooker.configuration.profile) | 1904 | parser = Parser(self.jobs, self.result_queue, self.parser_quit, init, self.cooker.configuration.profile) |
1906 | parser.start() | 1905 | parser.start() |
1906 | self.process_names.append(parser.name) | ||
1907 | self.processes.append(parser) | 1907 | self.processes.append(parser) |
1908 | 1908 | ||
1909 | self.results = itertools.chain(self.results, self.parse_generator()) | 1909 | self.results = itertools.chain(self.results, self.parse_generator()) |
@@ -1947,6 +1947,16 @@ class CookerParser(object): | |||
1947 | multiprocessing.util.Finalize(None, sync.join, exitpriority=-100) | 1947 | multiprocessing.util.Finalize(None, sync.join, exitpriority=-100) |
1948 | bb.codeparser.parser_cache_savemerge(self.cooker.data) | 1948 | bb.codeparser.parser_cache_savemerge(self.cooker.data) |
1949 | bb.fetch.fetcher_parse_done(self.cooker.data) | 1949 | bb.fetch.fetcher_parse_done(self.cooker.data) |
1950 | if self.cooker.configuration.profile: | ||
1951 | profiles = [] | ||
1952 | for i in self.process_names: | ||
1953 | logfile = "profile-parse-%s.log" % i | ||
1954 | if os.path.exists(logfile): | ||
1955 | profiles.append(logfile) | ||
1956 | |||
1957 | pout = "profile-parse.log.processed" | ||
1958 | bb.utils.process_profilelog(profiles, pout = pout) | ||
1959 | print("Processed parsing statistics saved to %s" % (pout)) | ||
1950 | 1960 | ||
1951 | def load_cached(self): | 1961 | def load_cached(self): |
1952 | for filename, appends in self.fromcache: | 1962 | for filename, appends in self.fromcache: |