diff options
author | Josh Stone <jistone@redhat.com> | 2009-06-23 18:31:38 -0700 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2009-06-23 18:36:37 -0700 |
commit | 5f4c8c6ef761b6150d2d7d38fd601bec633f80f4 (patch) | |
tree | 80a232c61b654469e3746848de119016fc13eed8 /dwflpp.h | |
parent | 760695dbfa5711e68555c192f5f4341e451d1d0c (diff) | |
download | systemtap-steved-5f4c8c6ef761b6150d2d7d38fd601bec633f80f4.tar.gz systemtap-steved-5f4c8c6ef761b6150d2d7d38fd601bec633f80f4.tar.xz systemtap-steved-5f4c8c6ef761b6150d2d7d38fd601bec633f80f4.zip |
Remove needless string copying
More fat-trimming optimization for ~7% off listing syscall.*.
* dwflpp.cxx (dwflpp::iterate_over_functions): remove a parameter copy
(dwflpp::module_name_matches): Use const string& parameters
(dwflpp::name_has_wildcard): Ditto.
(dwflpp::module_name_final_match): Ditto.
(dwflpp::function_name_matches_pattern): Ditto.
(dwflpp::function_name_matches): Ditto.
(dwflpp::function_name_final_match): Ditto.
Diffstat (limited to 'dwflpp.h')
-rw-r--r-- | dwflpp.h | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -198,13 +198,13 @@ struct dwflpp Dwarf_Die *query_cu_containing_address(Dwarf_Addr a); - bool module_name_matches(std::string pattern); - bool name_has_wildcard(std::string pattern); - bool module_name_final_match(std::string pattern); + bool module_name_matches(const std::string& pattern); + bool name_has_wildcard(const std::string& pattern); + bool module_name_final_match(const std::string& pattern); - bool function_name_matches_pattern(std::string name, std::string pattern); - bool function_name_matches(std::string pattern); - bool function_name_final_match(std::string pattern); + bool function_name_matches_pattern(const std::string& name, const std::string& pattern); + bool function_name_matches(const std::string& pattern); + bool function_name_final_match(const std::string& pattern); void iterate_over_modules(int (* callback)(Dwfl_Module *, void **, const char *, Dwarf_Addr, |