diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-05 12:46:38 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-05 12:46:38 +0000 |
commit | f0a51fb571f46531025fa09240bbc3e1af925e84 (patch) | |
tree | 558b4f0e737fda4b9ab60f252c9c23b8a4ca523e /tools/traceline | |
parent | 6390be368205705f49ead3cec40396519f13b889 (diff) | |
download | chromium_src-f0a51fb571f46531025fa09240bbc3e1af925e84.zip chromium_src-f0a51fb571f46531025fa09240bbc3e1af925e84.tar.gz chromium_src-f0a51fb571f46531025fa09240bbc3e1af925e84.tar.bz2 |
Fixes CRLF and trailing white spaces.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10982 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/traceline')
-rwxr-xr-x | tools/traceline/traceline/assembler.h | 2 | ||||
-rwxr-xr-x | tools/traceline/traceline/main.cc | 22 | ||||
-rwxr-xr-x | tools/traceline/traceline/sym_resolver.h | 4 |
3 files changed, 14 insertions, 14 deletions
diff --git a/tools/traceline/traceline/assembler.h b/tools/traceline/traceline/assembler.h index 32f12bc4..232fb36 100755 --- a/tools/traceline/traceline/assembler.h +++ b/tools/traceline/traceline/assembler.h @@ -536,7 +536,7 @@ class CodeBuffer { void stosd() { emit(0xab); } - + void sysenter() { emit(0x0f); emit(0x34); } diff --git a/tools/traceline/traceline/main.cc b/tools/traceline/traceline/main.cc index d0e220b..f149853 100755 --- a/tools/traceline/traceline/main.cc +++ b/tools/traceline/traceline/main.cc @@ -67,9 +67,9 @@ class Playground { : stack_unwind_depth_(0), log_heap_(false), log_lock_(false), - vista_(false) { } + vista_(false) { } + - // The maximum amount of frames we should unwind from the call stack. int stack_unwind_depth() { return stack_unwind_depth_; } void set_stack_unwind_depth(int depth) { stack_unwind_depth_ = depth; } @@ -102,7 +102,7 @@ class Playground { // fields that we expect to be zero. TODO this could be a lot better. memset(buf_, 0, sizeof(buf_)); } - + void AllocateInRemote() { // Try to get something out of the way and easy to debug. static void* kPlaygroundAddr = reinterpret_cast<void*>(0x66660000); @@ -276,7 +276,7 @@ class Playground { (remote_addr_ + stub_offset + cb->size() + 5); cb->jmp_rel(off); } - + // Makes a call to NtQueryPerformanceCounter, writing the timestamp to the // buffer pointed to by EDI. EDI it not incremented. EAX is not preserved. void AssembleQueryPerformanceCounter(CodeBuffer* cb) { @@ -682,7 +682,7 @@ class Playground { cb.mov(EDX, ESP); cb.sysenter(); - if (cb.size() > 200) { + if (cb.size() > 200) { NOTREACHED("code too big: %d", cb.size()); } } @@ -718,7 +718,7 @@ class Playground { cb.pop(EDI); // restore EDI that was saved in the record cb.ret(); // jmp back to the real ret ... - if (cb.size() > 56) { + if (cb.size() > 56) { NOTREACHED("ug"); } } @@ -742,7 +742,7 @@ class Playground { // can the same lock have multiple different copies, I would assume not. { CodeBuffer cb(buf_ + kStubOffset); - + // Set up an additional frame so that we capture the return. // TODO use memory instructions instead of using registers. cb.pop(EAX); // return address @@ -760,7 +760,7 @@ class Playground { { CodeBuffer cb(buf_ + kStubOffset + 40); - + cb.push(ESI); cb.mov(ESI, ESP); cb.push(EAX); @@ -789,7 +789,7 @@ class Playground { { CodeBuffer cb(buf_ + kStubOffset); - + // Set up an additional frame so that we capture the return. // TODO use memory instructions instead of using registers. cb.pop(EAX); // return address @@ -806,7 +806,7 @@ class Playground { { CodeBuffer cb(buf_ + kStubOffset + 40); - + cb.push(ESI); cb.mov(ESI, ESP); cb.push(EDI); @@ -836,7 +836,7 @@ class Playground { std::string moved_instructions = PatchPreamble(kFuncName, kStubOffset); CodeBuffer cb(buf_ + kStubOffset); - + // TODO use memory instructions instead of using registers. cb.pop(EDX); // return address cb.pop(EAX); // first argument (critical section pointer) diff --git a/tools/traceline/traceline/sym_resolver.h b/tools/traceline/traceline/sym_resolver.h index 53948b0..c3d93c2 100755 --- a/tools/traceline/traceline/sym_resolver.h +++ b/tools/traceline/traceline/sym_resolver.h @@ -17,7 +17,7 @@ #include <string> #include <map> -static BOOL CALLBACK SymEnumer(PCSTR name, DWORD64 base, PVOID context) { +static BOOL CALLBACK SymEnumer(PCSTR name, DWORD64 base, PVOID context) { reinterpret_cast<std::vector<DWORD64>*>(context)->push_back(base); return TRUE; } @@ -153,7 +153,7 @@ class SymResolver { NOTREACHED("SymCleanup failed: %d", GetLastError()); } } - + private: HANDLE proc_; ULONG64 base_; |