| Index: src/platform-linux.cc
|
| diff --git a/src/platform-linux.cc b/src/platform-linux.cc
|
| index ee0b951d0d8af2816c5b4413fcf1d31532944a60..3cbf4dafd23de6bc8efe145bb73befbe2f03821d 100644
|
| --- a/src/platform-linux.cc
|
| +++ b/src/platform-linux.cc
|
| @@ -182,12 +182,13 @@ PosixMemoryMappedFile::~PosixMemoryMappedFile() {
|
| }
|
|
|
|
|
| -void OS::LogSharedLibraryAddresses(Isolate* isolate) {
|
| +std::vector<OS::SharedLibraryAddress> OS::GetSharedLibraryAddresses() {
|
| + std::vector<SharedLibraryAddress> result;
|
| // This function assumes that the layout of the file is as follows:
|
| // hex_start_addr-hex_end_addr rwxp <unused data> [binary_file_name]
|
| // If we encounter an unexpected situation we abort scanning further entries.
|
| FILE* fp = fopen("/proc/self/maps", "r");
|
| - if (fp == NULL) return;
|
| + if (fp == NULL) return result;
|
|
|
| // Allocate enough room to be able to store a full file name.
|
| const int kLibNameLen = FILENAME_MAX + 1;
|
| @@ -227,7 +228,7 @@ void OS::LogSharedLibraryAddresses(Isolate* isolate) {
|
| snprintf(lib_name, kLibNameLen,
|
| "%08" V8PRIxPTR "-%08" V8PRIxPTR, start, end);
|
| }
|
| - LOG(isolate, SharedLibraryEvent(lib_name, start, end));
|
| + result.push_back(SharedLibraryAddress(lib_name, start, end));
|
| } else {
|
| // Entry not describing executable data. Skip to end of line to set up
|
| // reading the next entry.
|
| @@ -239,6 +240,7 @@ void OS::LogSharedLibraryAddresses(Isolate* isolate) {
|
| }
|
| free(lib_name);
|
| fclose(fp);
|
| + return result;
|
| }
|
|
|
|
|
|
|