| OLD | NEW |
| 1 // Copyright 2012 Google Inc. All Rights Reserved. | 1 // Copyright 2012 Google Inc. All Rights Reserved. |
| 2 // | 2 // |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
| 5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
| 6 // | 6 // |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 // | 8 // |
| 9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
| (...skipping 1660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1671 return true; | 1671 return true; |
| 1672 | 1672 |
| 1673 // Serialize the parameters into a new block. | 1673 // Serialize the parameters into a new block. |
| 1674 common::FlatAsanParameters fparams(*asan_parameters_); | 1674 common::FlatAsanParameters fparams(*asan_parameters_); |
| 1675 BlockGraph::Block* params_block = block_graph->AddBlock( | 1675 BlockGraph::Block* params_block = block_graph->AddBlock( |
| 1676 BlockGraph::DATA_BLOCK, fparams.data().size(), "AsanParameters"); | 1676 BlockGraph::DATA_BLOCK, fparams.data().size(), "AsanParameters"); |
| 1677 DCHECK_NE(reinterpret_cast<BlockGraph::Block*>(NULL), params_block); | 1677 DCHECK_NE(reinterpret_cast<BlockGraph::Block*>(NULL), params_block); |
| 1678 params_block->CopyData(fparams.data().size(), fparams.data().data()); | 1678 params_block->CopyData(fparams.data().size(), fparams.data().data()); |
| 1679 | 1679 |
| 1680 // Wire up any references that are required. | 1680 // Wire up any references that are required. |
| 1681 static_assert(14 == common::kAsanParametersVersion, | 1681 static_assert(15 == common::kAsanParametersVersion, |
| 1682 "Pointers in the params must be linked up here."); | 1682 "Pointers in the params must be linked up here."); |
| 1683 block_graph::TypedBlock<common::AsanParameters> params; | 1683 block_graph::TypedBlock<common::AsanParameters> params; |
| 1684 CHECK(params.Init(0, params_block)); | 1684 CHECK(params.Init(0, params_block)); |
| 1685 if (fparams->ignored_stack_ids != NULL) { | 1685 if (fparams->ignored_stack_ids != NULL) { |
| 1686 size_t offset = | 1686 size_t offset = |
| 1687 reinterpret_cast<const uint8_t*>(fparams->ignored_stack_ids) - | 1687 reinterpret_cast<const uint8_t*>(fparams->ignored_stack_ids) - |
| 1688 reinterpret_cast<const uint8_t*>(&fparams.params()); | 1688 reinterpret_cast<const uint8_t*>(&fparams.params()); |
| 1689 CHECK(params.SetReference(BlockGraph::ABSOLUTE_REF, | 1689 CHECK(params.SetReference(BlockGraph::ABSOLUTE_REF, |
| 1690 params->ignored_stack_ids, | 1690 params->ignored_stack_ids, |
| 1691 params_block, | 1691 params_block, |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1798 return left.mode < right.mode; | 1798 return left.mode < right.mode; |
| 1799 if (left.size != right.size) | 1799 if (left.size != right.size) |
| 1800 return left.size < right.size; | 1800 return left.size < right.size; |
| 1801 if (left.save_flags != right.save_flags) | 1801 if (left.save_flags != right.save_flags) |
| 1802 return left.save_flags < right.save_flags; | 1802 return left.save_flags < right.save_flags; |
| 1803 return left.opcode < right.opcode; | 1803 return left.opcode < right.opcode; |
| 1804 } | 1804 } |
| 1805 | 1805 |
| 1806 } // namespace transforms | 1806 } // namespace transforms |
| 1807 } // namespace instrument | 1807 } // namespace instrument |
| OLD | NEW |