LibWeb: Only generate ResourceLoader signposts while on Serenity
This commit is contained in:
parent
9e5480bcb5
commit
6027ab9e12
Notes:
sideshowbarker
2024-07-18 05:01:22 +09:00
Author: https://github.com/Dexesttp Commit: https://github.com/SerenityOS/serenity/commit/6027ab9e12 Pull-request: https://github.com/SerenityOS/serenity/pull/13922 Reviewed-by: https://github.com/krkk
1 changed files with 9 additions and 1 deletions
|
@ -17,7 +17,10 @@
|
|||
#include <LibWeb/Loader/ProxyMappings.h>
|
||||
#include <LibWeb/Loader/Resource.h>
|
||||
#include <LibWeb/Loader/ResourceLoader.h>
|
||||
#include <serenity.h>
|
||||
|
||||
#ifdef __serenity__
|
||||
# include <serenity.h>
|
||||
#endif
|
||||
|
||||
namespace Web {
|
||||
|
||||
|
@ -99,8 +102,13 @@ static String sanitized_url_for_logging(AK::URL const& url)
|
|||
|
||||
static void emit_signpost(String const& message, int id)
|
||||
{
|
||||
#ifdef __serenity__
|
||||
auto string_id = perf_register_string(message.characters(), message.length());
|
||||
perf_event(PERF_EVENT_SIGNPOST, string_id, id);
|
||||
#else
|
||||
(void)message;
|
||||
(void)id;
|
||||
#endif
|
||||
}
|
||||
|
||||
static size_t resource_id = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue