OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_NACL_RENDERER_PLUGIN_PNACL_COORDINATOR_H_ | 5 #ifndef COMPONENTS_NACL_RENDERER_PLUGIN_PNACL_COORDINATOR_H_ |
6 #define COMPONENTS_NACL_RENDERER_PLUGIN_PNACL_COORDINATOR_H_ | 6 #define COMPONENTS_NACL_RENDERER_PLUGIN_PNACL_COORDINATOR_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "components/nacl/renderer/plugin/nacl_subprocess.h" | 10 #include "components/nacl/renderer/plugin/nacl_subprocess.h" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 // Options for translation. | 154 // Options for translation. |
155 PP_PNaClOptions pnacl_options_; | 155 PP_PNaClOptions pnacl_options_; |
156 // Architecture-specific attributes used for translation. These are | 156 // Architecture-specific attributes used for translation. These are |
157 // supplied by Chrome, not the developer, and are therefore different | 157 // supplied by Chrome, not the developer, and are therefore different |
158 // from PNaCl options. | 158 // from PNaCl options. |
159 std::string architecture_attributes_; | 159 std::string architecture_attributes_; |
160 | 160 |
161 // Object file, produced by the translator and consumed by the linker. | 161 // Object file, produced by the translator and consumed by the linker. |
162 std::vector<TempFile*> obj_files_; | 162 std::vector<TempFile*> obj_files_; |
163 nacl::scoped_ptr<nacl::DescWrapper> invalid_desc_wrapper_; | 163 nacl::scoped_ptr<nacl::DescWrapper> invalid_desc_wrapper_; |
164 // Number of split modules (threads) for llc | 164 // Number of split modules for llc. |
165 int split_module_count_; | 165 uint32_t split_module_count_; |
| 166 // Number of threads for llc / subzero. |
| 167 uint32_t num_threads_; |
166 | 168 |
167 // Translated nexe file, produced by the linker. | 169 // Translated nexe file, produced by the linker. |
168 nacl::scoped_ptr<TempFile> temp_nexe_file_; | 170 nacl::scoped_ptr<TempFile> temp_nexe_file_; |
169 | 171 |
170 // Used to report information when errors (PPAPI or otherwise) are reported. | 172 // Used to report information when errors (PPAPI or otherwise) are reported. |
171 ErrorInfo error_info_; | 173 ErrorInfo error_info_; |
172 | 174 |
173 // True if an error was already reported, and translate_notify_callback_ | 175 // True if an error was already reported, and translate_notify_callback_ |
174 // was already run/consumed. | 176 // was already run/consumed. |
175 bool error_already_reported_; | 177 bool error_already_reported_; |
176 | 178 |
177 // State for timing and size information for UMA stats. | 179 // State for timing and size information for UMA stats. |
178 int64_t pexe_size_; // Count as we stream -- will converge to pexe size. | 180 int64_t pexe_size_; // Count as we stream -- will converge to pexe size. |
179 int64_t pexe_bytes_compiled_; // Count as we compile. | 181 int64_t pexe_bytes_compiled_; // Count as we compile. |
180 int64_t expected_pexe_size_; // Expected download total (-1 if unknown). | 182 int64_t expected_pexe_size_; // Expected download total (-1 if unknown). |
181 | 183 |
182 // The helper thread used to do translations via SRPC. | 184 // The helper thread used to do translations via SRPC. |
183 // It accesses fields of PnaclCoordinator so it must have a | 185 // It accesses fields of PnaclCoordinator so it must have a |
184 // shorter lifetime. | 186 // shorter lifetime. |
185 nacl::scoped_ptr<PnaclTranslateThread> translate_thread_; | 187 nacl::scoped_ptr<PnaclTranslateThread> translate_thread_; |
186 }; | 188 }; |
187 | 189 |
188 //---------------------------------------------------------------------- | 190 //---------------------------------------------------------------------- |
189 | 191 |
190 } // namespace plugin; | 192 } // namespace plugin; |
191 #endif // COMPONENTS_NACL_RENDERER_PLUGIN_PNACL_COORDINATOR_H_ | 193 #endif // COMPONENTS_NACL_RENDERER_PLUGIN_PNACL_COORDINATOR_H_ |
OLD | NEW |