summaryrefslogtreecommitdiffstats
path: root/src/include/usr/hwpf
diff options
context:
space:
mode:
authorBrian Horton <brianh@linux.ibm.com>2012-08-01 16:34:47 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-09-05 15:18:42 -0500
commit348e054c2d70697169a4ecbdc2eaab1932bd322c (patch)
tree2aab9491574d337151633861852e1f400621cea6 /src/include/usr/hwpf
parent53643b771cfa77708539de18b5fc9a2a4b19a141 (diff)
downloadtalos-hostboot-348e054c2d70697169a4ecbdc2eaab1932bd322c.tar.gz
talos-hostboot-348e054c2d70697169a4ecbdc2eaab1932bd322c.zip
Performance and size optimizations - inline simple methods
Move the code for some of the 'simple' methods (ie, {}, or simple methods that just set a value or return a value) from the .C file into the .H file, so that they're inlined. Saves in both size and performance. Didn't measure performance gains (not sure I can in a simulated environment..) but generated .list files look much better. Size - hbicore_extended.bin dropped from 1442928 to 1426544 (16K, 1%) Change-Id: I6915cba77520b4a28237c557760ababcca781804 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1464 Tested-by: Jenkins Server Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr/hwpf')
-rw-r--r--src/include/usr/hwpf/fapi/fapiReturnCode.H52
-rw-r--r--src/include/usr/hwpf/fapi/fapiTarget.H51
2 files changed, 51 insertions, 52 deletions
diff --git a/src/include/usr/hwpf/fapi/fapiReturnCode.H b/src/include/usr/hwpf/fapi/fapiReturnCode.H
index d93426328..ed6b37309 100644
--- a/src/include/usr/hwpf/fapi/fapiReturnCode.H
+++ b/src/include/usr/hwpf/fapi/fapiReturnCode.H
@@ -1,26 +1,25 @@
-/* IBM_PROLOG_BEGIN_TAG
- * This is an automatically generated prolog.
- *
- * $Source: src/include/usr/hwpf/fapi/fapiReturnCode.H $
- *
- * IBM CONFIDENTIAL
- *
- * COPYRIGHT International Business Machines Corp. 2011-2012
- *
- * p1
- *
- * Object Code Only (OCO) source materials
- * Licensed Internal Code Source Materials
- * IBM HostBoot Licensed Internal Code
- *
- * The source code for this program is not published or other-
- * wise divested of its trade secrets, irrespective of what has
- * been deposited with the U.S. Copyright Office.
- *
- * Origin: 30
- *
- * IBM_PROLOG_END_TAG
- */
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/hwpf/fapi/fapiReturnCode.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2011,2012 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
/**
* @file fapiReturnCode.H
*
@@ -43,6 +42,7 @@
* mjjones 02/22/2012 Allow user to add Target FFDC
* mjjones 03/16/2012 Add type to FFDC data
* mjjones 03/16/2012 Allow different PLAT errors
+ * brianh 07/31/2012 performance/size optimizations
* mjjones 08/14/2012 Created getCreateReturnCodeDataRef
*/
@@ -111,7 +111,7 @@ public:
/**
* @brief Default constructor. Sets rcValue to success
*/
- ReturnCode();
+ ReturnCode() : iv_rcValue(FAPI_RC_SUCCESS), iv_pDataRef(NULL) { }
/**
* @brief Constructor. Sets rcValue to the specified value
@@ -165,7 +165,7 @@ public:
*
* @return bool. True if ok, else false
*/
- bool ok() const;
+ bool ok() const { return (iv_rcValue == FAPI_RC_SUCCESS); }
/**
* @brief uint32_t conversion function. Returns the rcValue
@@ -175,7 +175,7 @@ public:
* 2/ ReturnCode to ReturnCode (Both ReturnCode converted to uint32_t)
* This allows a user to test if a ReturnCode is bad (if (l_rc){})
*/
- operator uint32_t() const;
+ operator uint32_t() const { return iv_rcValue; }
/**
* @brief Sets a FAPI error. Sets the rcValue to the supplied value (from
diff --git a/src/include/usr/hwpf/fapi/fapiTarget.H b/src/include/usr/hwpf/fapi/fapiTarget.H
index 63da687b9..0437691b3 100644
--- a/src/include/usr/hwpf/fapi/fapiTarget.H
+++ b/src/include/usr/hwpf/fapi/fapiTarget.H
@@ -1,26 +1,25 @@
-/* IBM_PROLOG_BEGIN_TAG
- * This is an automatically generated prolog.
- *
- * $Source: src/include/usr/hwpf/fapi/fapiTarget.H $
- *
- * IBM CONFIDENTIAL
- *
- * COPYRIGHT International Business Machines Corp. 2011-2012
- *
- * p1
- *
- * Object Code Only (OCO) source materials
- * Licensed Internal Code Source Materials
- * IBM HostBoot Licensed Internal Code
- *
- * The source code for this program is not published or other-
- * wise divested of its trade secrets, irrespective of what has
- * been deposited with the U.S. Copyright Office.
- *
- * Origin: 30
- *
- * IBM_PROLOG_END_TAG
- */
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/hwpf/fapi/fapiTarget.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2011,2012 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
/**
* @file fapiTarget.H
*
@@ -170,7 +169,7 @@ public:
*
* @return Handle_t. The handle.
*/
- void * get() const;
+ void * get() const { return iv_pHandle; }
/**
* @brief Set the handle. Platform using Handle_t as handle
@@ -186,14 +185,14 @@ public:
*
* @return The type of target represented by this target
*/
- TargetType getType() const;
+ TargetType getType() const { return iv_type; }
/**
* @brief Set the target type
*
* @param[in] i_type The type of target represented by this target
*/
- void setType(const TargetType i_type);
+ void setType(const TargetType i_type) { iv_type = i_type; }
/**
* @brief Returns if the target is a chip
OpenPOWER on IntegriCloud