Commit [178b0c]  Maximize  Restore  History

replace non-typed use of string source_filename by debug_name_id

before patch

$ time opannotate session:./current --source > /dev/null
real 0m0.645s
user 0m0.590s
sys 0m0.050s

after patch

$ time opannotate session:./current --source > /dev/null
real 0m0.537s
user 0m0.470s
sys 0m0.060s

most of difference in speed come from this chunk

--- libpp/sample_container.cpp 29 May 2003 00:52:03 -0000 1.2
+++ libpp/sample_container.cpp 7 Jun 2003 15:54:28 -0000
@@ -75,15 +75,13 @@

unsigned int
-sample_container::accumulate_samples(string const & filename) const
+sample_container::accumulate_samples(debug_name_id filename_id) const
{
build_by_loc();

sample_entry lower, upper;

- debug_name_id const id = debug_names.create(filename);
-
- lower.file_loc.filename = upper.file_loc.filename = id;
+ lower.file_loc.filename = upper.file_loc.filename = filename_id;

There is no meaningfull change in memory use.

I'll do later similar things for image_name and perhaps symbol_name

regards,
Phil

Philippe Elie Philippe Elie 2003-06-07

changed ChangeLog
changed libpp/name_storage.cpp
changed libpp/name_storage.h
changed libpp/profile_container.cpp
changed libpp/profile_container.h
changed libpp/sample_container.cpp
changed libpp/sample_container.h
changed libpp/symbol_container.cpp
changed libpp/symbol_container.h
changed pp/opannotate.cpp
ChangeLog Diff Switch to side-by-side view
Loading...
libpp/name_storage.cpp Diff Switch to side-by-side view
Loading...
libpp/name_storage.h Diff Switch to side-by-side view
Loading...
libpp/profile_container.cpp Diff Switch to side-by-side view
Loading...
libpp/profile_container.h Diff Switch to side-by-side view
Loading...
libpp/sample_container.cpp Diff Switch to side-by-side view
Loading...
libpp/sample_container.h Diff Switch to side-by-side view
Loading...
libpp/symbol_container.cpp Diff Switch to side-by-side view
Loading...
libpp/symbol_container.h Diff Switch to side-by-side view
Loading...
pp/opannotate.cpp Diff Switch to side-by-side view
Loading...

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks