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

Side by Side Diff: src/heap.cc

Issue 119304: Add log compression ability. (Closed)
Patch Set: Created 11 years, 6 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
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1748 matching lines...) Expand 10 before | Expand all | Expand 10 after
1759 if (!self_reference.is_null()) { 1759 if (!self_reference.is_null()) {
1760 *(self_reference.location()) = code; 1760 *(self_reference.location()) = code;
1761 } 1761 }
1762 // Migrate generated code. 1762 // Migrate generated code.
1763 // The generated code can contain Object** values (typically from handles) 1763 // The generated code can contain Object** values (typically from handles)
1764 // that are dereferenced during the copy to point directly to the actual heap 1764 // that are dereferenced during the copy to point directly to the actual heap
1765 // objects. These pointers can include references to the code object itself, 1765 // objects. These pointers can include references to the code object itself,
1766 // through the self_reference parameter. 1766 // through the self_reference parameter.
1767 code->CopyFrom(desc); 1767 code->CopyFrom(desc);
1768 if (sinfo != NULL) sinfo->Serialize(code); // write scope info 1768 if (sinfo != NULL) sinfo->Serialize(code); // write scope info
1769 LOG(CodeAllocateEvent(code, desc.origin));
1770 1769
1771 #ifdef DEBUG 1770 #ifdef DEBUG
1772 code->Verify(); 1771 code->Verify();
1773 #endif 1772 #endif
1774 return code; 1773 return code;
1775 } 1774 }
1776 1775
1777 1776
1778 Object* Heap::CopyCode(Code* code) { 1777 Object* Heap::CopyCode(Code* code) {
1779 // Allocate an object the same size as the code object. 1778 // Allocate an object the same size as the code object.
(...skipping 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after
3472 #ifdef DEBUG 3471 #ifdef DEBUG
3473 bool Heap::GarbageCollectionGreedyCheck() { 3472 bool Heap::GarbageCollectionGreedyCheck() {
3474 ASSERT(FLAG_gc_greedy); 3473 ASSERT(FLAG_gc_greedy);
3475 if (Bootstrapper::IsActive()) return true; 3474 if (Bootstrapper::IsActive()) return true;
3476 if (disallow_allocation_failure()) return true; 3475 if (disallow_allocation_failure()) return true;
3477 return CollectGarbage(0, NEW_SPACE); 3476 return CollectGarbage(0, NEW_SPACE);
3478 } 3477 }
3479 #endif 3478 #endif
3480 3479
3481 } } // namespace v8::internal 3480 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/ia32/assembler-ia32.cc » ('j') | src/log.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698