Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(528)

Side by Side Diff: ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc

Issue 290993006: Pepper: Remove Quota management from TempFile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nits Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ppapi/native_client/src/trusted/plugin/service_runtime.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.h" 5 #include "ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 8
9 #include "native_client/src/trusted/desc/nacl_desc_wrapper.h" 9 #include "native_client/src/trusted/desc/nacl_desc_wrapper.h"
10 #include "ppapi/cpp/var.h" 10 #include "ppapi/cpp/var.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 error_info.message()); 179 error_info.message());
180 return; 180 return;
181 } 181 }
182 182
183 llc_subprocess_active_ = true; 183 llc_subprocess_active_ = true;
184 core->CallOnMainThread(0, 184 core->CallOnMainThread(0,
185 coordinator_->GetUMATimeCallback( 185 coordinator_->GetUMATimeCallback(
186 "NaCl.Perf.PNaClLoadTime.LoadCompiler", 186 "NaCl.Perf.PNaClLoadTime.LoadCompiler",
187 NaClGetTimeOfDayMicroseconds() - llc_start_time), 187 NaClGetTimeOfDayMicroseconds() - llc_start_time),
188 PP_OK); 188 PP_OK);
189 // Run LLC.
190 PluginReverseInterface* llc_reverse =
191 llc_subprocess_->service_runtime()->rev_interface();
192 for (size_t i = 0; i < obj_files_->size(); i++) {
193 llc_reverse->AddTempQuotaManagedFile((*obj_files_)[i]->identifier());
194 }
195 } 189 }
196 190
197 int64_t compile_start_time = NaClGetTimeOfDayMicroseconds(); 191 int64_t compile_start_time = NaClGetTimeOfDayMicroseconds();
198 bool init_success; 192 bool init_success;
199 193
200 std::vector<char> split_args; 194 std::vector<char> split_args;
201 GetLlcCommandLine(plugin_, 195 GetLlcCommandLine(plugin_,
202 &split_args, 196 &split_args,
203 obj_files_->size(), 197 obj_files_->size(),
204 pnacl_options_->opt_level, 198 pnacl_options_->opt_level,
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 "Link process could not be created: " + 349 "Link process could not be created: " +
356 error_info.message()); 350 error_info.message());
357 return false; 351 return false;
358 } 352 }
359 ld_subprocess_active_ = true; 353 ld_subprocess_active_ = true;
360 core->CallOnMainThread(0, 354 core->CallOnMainThread(0,
361 coordinator_->GetUMATimeCallback( 355 coordinator_->GetUMATimeCallback(
362 "NaCl.Perf.PNaClLoadTime.LoadLinker", 356 "NaCl.Perf.PNaClLoadTime.LoadLinker",
363 NaClGetTimeOfDayMicroseconds() - ld_start_time), 357 NaClGetTimeOfDayMicroseconds() - ld_start_time),
364 PP_OK); 358 PP_OK);
365 PluginReverseInterface* ld_reverse =
366 ld_subprocess_->service_runtime()->rev_interface();
367 ld_reverse->AddTempQuotaManagedFile(nexe_file_->identifier());
368 } 359 }
369 360
370 int64_t link_start_time = NaClGetTimeOfDayMicroseconds(); 361 int64_t link_start_time = NaClGetTimeOfDayMicroseconds();
371 // Run LD. 362 // Run LD.
372 bool success = ld_subprocess_->InvokeSrpcMethod( 363 bool success = ld_subprocess_->InvokeSrpcMethod(
373 "RunWithSplit", 364 "RunWithSplit",
374 "ihhhhhhhhhhhhhhhhh", 365 "ihhhhhhhhhhhhhhhhh",
375 &params, 366 &params,
376 static_cast<int>(obj_files_->size()), 367 static_cast<int>(obj_files_->size()),
377 ld_in_files[0]->desc(), 368 ld_in_files[0]->desc(),
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 AbortSubprocesses(); 442 AbortSubprocesses();
452 if (translate_thread_ != NULL) 443 if (translate_thread_ != NULL)
453 NaClThreadJoin(translate_thread_.get()); 444 NaClThreadJoin(translate_thread_.get());
454 PLUGIN_PRINTF(("~PnaclTranslateThread joined\n")); 445 PLUGIN_PRINTF(("~PnaclTranslateThread joined\n"));
455 NaClCondVarDtor(&buffer_cond_); 446 NaClCondVarDtor(&buffer_cond_);
456 NaClMutexDtor(&cond_mu_); 447 NaClMutexDtor(&cond_mu_);
457 NaClMutexDtor(&subprocess_mu_); 448 NaClMutexDtor(&subprocess_mu_);
458 } 449 }
459 450
460 } // namespace plugin 451 } // namespace plugin
OLDNEW
« no previous file with comments | « no previous file | ppapi/native_client/src/trusted/plugin/service_runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698