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 #include "ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h" | 5 #include "ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "native_client/src/include/portability_io.h" | 10 #include "native_client/src/include/portability_io.h" |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 PP_NACL_EVENT_PROGRESS, | 220 PP_NACL_EVENT_PROGRESS, |
221 pexe_url_.c_str(), | 221 pexe_url_.c_str(), |
222 PP_TRUE, | 222 PP_TRUE, |
223 pexe_bytes_compiled_, | 223 pexe_bytes_compiled_, |
224 expected_pexe_size_); | 224 expected_pexe_size_); |
225 } | 225 } |
226 struct nacl_abi_stat stbuf; | 226 struct nacl_abi_stat stbuf; |
227 struct NaClDesc* desc = temp_nexe_file_->read_wrapper()->desc(); | 227 struct NaClDesc* desc = temp_nexe_file_->read_wrapper()->desc(); |
228 if (0 == (*((struct NaClDescVtbl const *)desc->base.vtbl)->Fstat)(desc, | 228 if (0 == (*((struct NaClDescVtbl const *)desc->base.vtbl)->Fstat)(desc, |
229 &stbuf)) { | 229 &stbuf)) { |
230 size_t nexe_size = stbuf.nacl_abi_st_size; | 230 nacl_abi_off_t nexe_size = stbuf.nacl_abi_st_size; |
231 HistogramSizeKB(plugin_->uma_interface(), | 231 HistogramSizeKB(plugin_->uma_interface(), |
232 "NaCl.Perf.Size.PNaClTranslatedNexe", | 232 "NaCl.Perf.Size.PNaClTranslatedNexe", |
233 static_cast<int32_t>(nexe_size / 1024)); | 233 static_cast<int32_t>(nexe_size / 1024)); |
234 HistogramRatio(plugin_->uma_interface(), | 234 HistogramRatio(plugin_->uma_interface(), |
235 "NaCl.Perf.Size.PexeNexeSizePct", pexe_size_, nexe_size); | 235 "NaCl.Perf.Size.PexeNexeSizePct", pexe_size_, nexe_size); |
236 } | 236 } |
237 // The nexe is written to the temp_nexe_file_. We must Reset() the file | 237 // The nexe is written to the temp_nexe_file_. We must Reset() the file |
238 // pointer to be able to read it again from the beginning. | 238 // pointer to be able to read it again from the beginning. |
239 temp_nexe_file_->Reset(); | 239 temp_nexe_file_->Reset(); |
240 | 240 |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 invalid_desc_wrapper_.get(), | 454 invalid_desc_wrapper_.get(), |
455 &error_info_, | 455 &error_info_, |
456 resources_.get(), | 456 resources_.get(), |
457 &pnacl_options_, | 457 &pnacl_options_, |
458 architecture_attributes_, | 458 architecture_attributes_, |
459 this, | 459 this, |
460 plugin_); | 460 plugin_); |
461 } | 461 } |
462 | 462 |
463 } // namespace plugin | 463 } // namespace plugin |
OLD | NEW |