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

Side by Side Diff: courgette/ensemble_create.cc

Issue 8477045: Add Elf 32 Support to Courgette. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Remove debug printf present by mistake. Created 9 years, 1 month 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 | « courgette/ensemble_apply.cc ('k') | courgette/patch_generator_x86_32.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // The main idea in Courgette is to do patching *under a tranformation*. The 5 // The main idea in Courgette is to do patching *under a tranformation*. The
6 // input is transformed into a new representation, patching occurs in the new 6 // input is transformed into a new representation, patching occurs in the new
7 // repesentation, and then the tranform is reversed to get the patched data. 7 // repesentation, and then the tranform is reversed to get the patched data.
8 // 8 //
9 // The idea is applied to pieces (or 'elements') of the whole (or 'ensemble'). 9 // The idea is applied to pieces (or 'elements') of the whole (or 'ensemble').
10 // Each of the elements has to go through the same set of steps in lock-step. 10 // Each of the elements has to go through the same set of steps in lock-step.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 break; 69 break;
70 case EXE_WIN_32_X86: { 70 case EXE_WIN_32_X86: {
71 TransformationPatchGenerator* generator = 71 TransformationPatchGenerator* generator =
72 new PatchGeneratorX86_32( 72 new PatchGeneratorX86_32(
73 old_element, 73 old_element,
74 new_element, 74 new_element,
75 new PatcherX86_32(old_element->region()), 75 new PatcherX86_32(old_element->region()),
76 EXE_WIN_32_X86); 76 EXE_WIN_32_X86);
77 return generator; 77 return generator;
78 } 78 }
79 case EXE_ELF_32_X86: {
80 TransformationPatchGenerator* generator =
81 new PatchGeneratorX86_32(
82 old_element,
83 new_element,
84 new PatcherX86_32(old_element->region()),
85 EXE_ELF_32_X86);
86 return generator;
87 }
79 } 88 }
80 89
81 LOG(WARNING) << "Unexpected Element::Kind " << old_element->kind(); 90 LOG(WARNING) << "Unexpected Element::Kind " << old_element->kind();
82 return NULL; 91 return NULL;
83 } 92 }
84 93
85 // Checks to see if the proposed comparison is 'unsafe'. Sometimes one element 94 // Checks to see if the proposed comparison is 'unsafe'. Sometimes one element
86 // from 'old' is matched as the closest element to multiple elements from 'new'. 95 // from 'old' is matched as the closest element to multiple elements from 'new'.
87 // Each time this happens, the old element is transformed and serialized. This 96 // Each time this happens, the old element is transformed and serialized. This
88 // is a problem when the old element is huge compared with the new element 97 // is a problem when the old element is huge compared with the new element
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 return C_STREAM_ERROR; 428 return C_STREAM_ERROR;
420 } 429 }
421 430
422 VLOG(1) << "done GenerateEnsemblePatch " 431 VLOG(1) << "done GenerateEnsemblePatch "
423 << (base::Time::Now() - start_time).InSecondsF() << "s"; 432 << (base::Time::Now() - start_time).InSecondsF() << "s";
424 433
425 return C_OK; 434 return C_OK;
426 } 435 }
427 436
428 } // namespace 437 } // namespace
OLDNEW
« no previous file with comments | « courgette/ensemble_apply.cc ('k') | courgette/patch_generator_x86_32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698