| 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 "sync/syncable/base_transaction.h" | 5 #include "sync/syncable/base_transaction.h" |
| 6 | 6 |
| 7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
| 8 #include "sync/syncable/directory.h" | 8 #include "sync/syncable/directory.h" |
| 9 | 9 |
| 10 namespace syncer { |
| 10 namespace syncable { | 11 namespace syncable { |
| 11 | 12 |
| 12 void BaseTransaction::Lock() { | 13 void BaseTransaction::Lock() { |
| 13 TRACE_EVENT2("sync_lock_contention", "AcquireLock", | 14 TRACE_EVENT2("sync_lock_contention", "AcquireLock", |
| 14 "src_file", from_here_.file_name(), | 15 "src_file", from_here_.file_name(), |
| 15 "src_func", from_here_.function_name()); | 16 "src_func", from_here_.function_name()); |
| 16 | 17 |
| 17 directory_->kernel_->transaction_mutex.Acquire(); | 18 directory_->kernel_->transaction_mutex.Acquire(); |
| 18 } | 19 } |
| 19 | 20 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 TRACE_EVENT_BEGIN2("sync", name_, | 60 TRACE_EVENT_BEGIN2("sync", name_, |
| 60 "src_file", from_here_.file_name(), | 61 "src_file", from_here_.file_name(), |
| 61 "src_func", from_here_.function_name()); | 62 "src_func", from_here_.function_name()); |
| 62 } | 63 } |
| 63 | 64 |
| 64 BaseTransaction::~BaseTransaction() { | 65 BaseTransaction::~BaseTransaction() { |
| 65 TRACE_EVENT_END0("sync", name_); | 66 TRACE_EVENT_END0("sync", name_); |
| 66 } | 67 } |
| 67 | 68 |
| 68 } // namespace syncable | 69 } // namespace syncable |
| 70 } // namespace syncer |
| OLD | NEW |