@@ -60,7 +60,7 @@ NativeStackTrace::NativeStackTrace(uint32_t pid, const unsigned char *raw_stack,
60
60
61
61
// Check whether the entry for the process ID is presented in the cache
62
62
if (!is_cached (cache, pid)) {
63
- logInfo (2 ," The given key %d is not presented in the cache\n " , pid);
63
+ logInfo (3 ," The given key %d is not presented in the cache\n " , pid);
64
64
65
65
as = unw_create_addr_space (&my_accessors, 0 );
66
66
upt = _UPT_create (pid);
@@ -85,7 +85,7 @@ NativeStackTrace::NativeStackTrace(uint32_t pid, const unsigned char *raw_stack,
85
85
cache_put (cache, pid, cursor, as, upt);
86
86
87
87
} else {
88
- logInfo (2 ," Found entry for the given key %d in the cache\n " , pid);
88
+ logInfo (3 ," Found entry for the given key %d in the cache\n " , pid);
89
89
// Get from the cache
90
90
UnwindCacheEntry cached_entry = cache_get (cache, pid);
91
91
cursor = cached_entry.cursor ;
@@ -236,7 +236,7 @@ bool NativeStackTrace::is_cached(const UnwindCache &map, const uint32_t &key) {
236
236
return true ;
237
237
}
238
238
catch (const std::out_of_range&) {
239
- logInfo (2 , " No entry for %d in the cache\n " , key);
239
+ logInfo (3 , " No entry for %d in the cache\n " , key);
240
240
}
241
241
return false ;
242
242
}
@@ -250,14 +250,14 @@ UnwindCacheEntry NativeStackTrace::cache_get(const UnwindCache &map, const uint3
250
250
void NativeStackTrace::cache_put (UnwindCache &mp, const uint32_t &key, const unw_cursor_t cursor, const unw_addr_space_t as, void *upt) {
251
251
// Check available capacity
252
252
if (cache_size () > NativeStackTrace::CacheMaxSizeMB*1024 *1024 - cache_single_entry_size ()) {
253
- logInfo (2 , " The cache usage is %.2f MB, close to reaching the max memory usage (%d MB)\n " , cache_size_KB ()/1024 , NativeStackTrace::CacheMaxSizeMB);
254
- logInfo (2 , " Skipping adding an entry for %d to the cache\n " , key);
253
+ logInfo (3 , " The cache usage is %.2f MB, close to reaching the max memory usage (%d MB)\n " , cache_size_KB ()/1024 , NativeStackTrace::CacheMaxSizeMB);
254
+ logInfo (3 , " Skipping adding an entry for %d to the cache\n " , key);
255
255
return ;
256
256
}
257
257
258
258
UnwindCacheEntry entry = {cursor, as, upt, now};
259
259
mp[key] = entry;
260
- logInfo (2 , " New entry for %d was added to the cache\n " , key);
260
+ logInfo (3 , " New entry for %d was added to the cache\n " , key);
261
261
}
262
262
263
263
// cache_delete_key removes the element from the cache and destroys unwind address space and UPT
@@ -268,13 +268,13 @@ bool NativeStackTrace::cache_delete_key(UnwindCache &mp, const uint32_t &key) {
268
268
e = cache_get (mp, key);
269
269
}
270
270
catch (const std::out_of_range&) {
271
- logInfo (2 , " Failed to delete entry for %d: no such key in the cache\n " , key);
271
+ logInfo (3 , " Failed to delete entry for %d: no such key in the cache\n " , key);
272
272
return false ;
273
273
}
274
274
275
275
mp.erase (key);
276
276
cleanup (e.upt , e.as );
277
- logInfo (2 , " The entry for %d was deleted from the cache\n " , key);
277
+ logInfo (3 , " The entry for %d was deleted from the cache\n " , key);
278
278
return true ;
279
279
}
280
280
@@ -315,8 +315,8 @@ void NativeStackTrace::cache_eviction(UnwindCache &mp) {
315
315
316
316
if (keys_to_delete.size () > 0 ) {
317
317
float _cache_size = cache_size_KB ();
318
- logInfo (2 ," Evicted %d item(s) from the cache\n " , keys_to_delete.size ());
319
- logInfo (2 ," The cache usage after eviction action is %.2f KB (released %.2f KB)\n " , _cache_size, _prev_cache_size - _cache_size);
318
+ logInfo (3 ," Evicted %d item(s) from the cache\n " , keys_to_delete.size ());
319
+ logInfo (3 ," The cache usage after eviction action is %.2f KB (released %.2f KB)\n " , _cache_size, _prev_cache_size - _cache_size);
320
320
}
321
321
}
322
322
0 commit comments