Commit d1aee56d authored by Etienne Pierre-doray's avatar Etienne Pierre-doray Committed by Commit Bot

[Jank]: Add uri trace events

To investigate jank found in UMA sampling profiler.

Bug: chromium:1081433
Change-Id: I457731380505af5a4d7a0c30d01b4049ffd2b436
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2242037
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68326}
parent 6ba537af
......@@ -10,6 +10,7 @@
#include "src/strings/char-predicates-inl.h"
#include "src/strings/string-search.h"
#include "src/strings/unicode-inl.h"
#include "src/tracing/trace-event.h"
namespace v8 {
namespace internal {
......@@ -174,6 +175,8 @@ bool IntoOneAndTwoByte(Handle<String> uri, bool is_uri,
MaybeHandle<String> Uri::Decode(Isolate* isolate, Handle<String> uri,
bool is_uri) {
TRACE_EVENT0("v8", "V8.DecodeUri");
uri = String::Flatten(isolate, uri);
std::vector<uint8_t> one_byte_buffer;
std::vector<uc16> two_byte_buffer;
......@@ -278,6 +281,8 @@ void EncodePair(uc16 cc1, uc16 cc2, std::vector<uint8_t>* buffer) {
MaybeHandle<String> Uri::Encode(Isolate* isolate, Handle<String> uri,
bool is_uri) {
TRACE_EVENT0("v8", "V8.EncodeUri");
uri = String::Flatten(isolate, uri);
int uri_length = uri->length();
std::vector<uint8_t> buffer;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment