Skip to content

Commit

Permalink
Cleaning up logs and unnecessary changes.
Browse files Browse the repository at this point in the history
Change-Id: I75ee9c2bdd2d205e1005357b2b570747c08b01ff
  • Loading branch information
sideb0ard committed Nov 14, 2023
1 parent e89462a commit d6d1629
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 27 deletions.
10 changes: 1 addition & 9 deletions cobalt/debug/backend/tracing_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ constexpr char kInspectorDomain[] = "Tracing";
constexpr char kStarted[] = "started";
constexpr char kCategories[] = "categories";

// Size in characters of JSON to batch dataCollected events.
// constexpr size_t kDataCollectedSize = 24 * 1024;
} // namespace


Expand Down Expand Up @@ -99,7 +97,6 @@ void TraceEventAgent::CollectTraceData(
base::OnceClosure finished_cb,
const scoped_refptr<base::RefCountedString>& event_string,
bool has_more_events) {
LOG(INFO) << "YO THOR EVNT APPEND " << event_string->data();
trace_buffer_.AddFragment(event_string->data());
if (!has_more_events) {
std::move(finished_cb).Run();

Check warning on line 102 in cobalt/debug/backend/tracing_controller.cc

View check run for this annotation

Codecov / codecov/patch

cobalt/debug/backend/tracing_controller.cc#L99-L102

Added lines #L99 - L102 were not covered by tests
Expand All @@ -111,7 +108,6 @@ TraceV8Agent::TraceV8Agent(script::ScriptDebugger* script_debugger)
: script_debugger_(script_debugger) {}

Check warning on line 108 in cobalt/debug/backend/tracing_controller.cc

View check run for this annotation

Codecov / codecov/patch

cobalt/debug/backend/tracing_controller.cc#L108

Added line #L108 was not covered by tests

void TraceV8Agent::AppendTraceEvent(const std::string& trace_event_json) {
LOG(INFO) << "YO THOR V8 APPEND " << trace_event_json;
trace_buffer_.AddFragment(trace_event_json);

Check warning on line 111 in cobalt/debug/backend/tracing_controller.cc

View check run for this annotation

Codecov / codecov/patch

cobalt/debug/backend/tracing_controller.cc#L110-L111

Added lines #L110 - L111 were not covered by tests
}

Expand Down Expand Up @@ -152,7 +148,7 @@ TracingController::TracingController(DebugDispatcher* dispatcher,
base::Bind(&TracingController::Start, base::Unretained(this));

Check warning on line 148 in cobalt/debug/backend/tracing_controller.cc

View check run for this annotation

Codecov / codecov/patch

cobalt/debug/backend/tracing_controller.cc#L145-L148

Added lines #L145 - L148 were not covered by tests

agents_.push_back(std::make_unique<TraceEventAgent>());

Check warning on line 150 in cobalt/debug/backend/tracing_controller.cc

View check run for this annotation

Codecov / codecov/patch

cobalt/debug/backend/tracing_controller.cc#L150

Added line #L150 was not covered by tests
agents_.push_back(std::make_unique<TraceV8Agent>(script_debugger));
// agents_.push_back(std::make_unique<TraceV8Agent>(script_debugger));
}

void TracingController::Thaw(JSONObject agent_state) {
Expand Down Expand Up @@ -199,7 +195,6 @@ JSONObject TracingController::Freeze() {
}

void TracingController::End(Command command) {
// DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
if (!tracing_started_) {
command.SendErrorResponse(Command::kInvalidRequest, "Tracing not started");
return;

Check warning on line 200 in cobalt/debug/backend/tracing_controller.cc

View check run for this annotation

Codecov / codecov/patch

cobalt/debug/backend/tracing_controller.cc#L197-L200

Added lines #L197 - L200 were not covered by tests
Expand All @@ -215,7 +210,6 @@ void TracingController::End(Command command) {
}

void TracingController::Start(Command command) {
// DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
if (tracing_started_) {
command.SendErrorResponse(Command::kInvalidRequest,
"Tracing already started");
Expand Down Expand Up @@ -294,8 +288,6 @@ void TracingController::SendDataCollectedEvent() {
if (collected_events_) {
std::string events;
collected_events_->GetString(0, &events);
LOG(INFO) << "YO THOR ! SEND DATA COLLECTED! num:"
<< collected_events_->GetSize() << " Events:" << events;
JSONObject params(new base::DictionaryValue());

Check warning on line 291 in cobalt/debug/backend/tracing_controller.cc

View check run for this annotation

Codecov / codecov/patch

cobalt/debug/backend/tracing_controller.cc#L287-L291

Added lines #L287 - L291 were not covered by tests
// Releasing the list into the value param avoids copying it.
params->Set("value", std::move(collected_events_));
Expand Down
2 changes: 0 additions & 2 deletions cobalt/media/base/sbplayer_pipeline.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,6 @@ void SbPlayerPipeline::OnDemuxerStreamRead(
#endif // SB_HAS(PLAYER_WITH_URL)
DCHECK(type == DemuxerStream::AUDIO || type == DemuxerStream::VIDEO)
<< "Unsupported DemuxerStream::Type " << type;
TRACE_EVENT0("cobalt::media", "SbPlayerPipeline::OnDemuxerStreamRead");

if (!task_runner_->BelongsToCurrentThread()) {
task_runner_->PostTask(
Expand Down Expand Up @@ -1067,7 +1066,6 @@ void SbPlayerPipeline::OnNeedData(DemuxerStream::Type type,
#endif // SB_HAS(PLAYER_WITH_URL)
DCHECK(task_runner_->BelongsToCurrentThread());

TRACE_EVENT0("cobalt::media", "SbPlayerPipeline::OnNeedData");
// In case if Stop() has been called.
if (!player_bridge_) {
return;
Expand Down
16 changes: 0 additions & 16 deletions third_party/devtools/front_end/timeline_model/TimelineModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,6 @@
/**
* @unrestricted
*/
let printObj = function (obj) {
let string = '';
for (let prop in obj) {
if (typeof obj[prop] == 'string') {
string += prop + ': ' + obj[prop] + '; \n';
}
// else {
// string += prop + ': {NOTaSTRING}; \n';
// }
}
return string;
}

export class TimelineModelImpl {
constructor() {
this._reset();
Expand Down Expand Up @@ -601,7 +588,6 @@ export class TimelineModelImpl {
let i = events.lowerBound(range.from, (time, event) => time - event.startTime);
for (; i < events.length; i++) {
const event = events[i];

if (event.startTime >= range.to) {
break;
}
Expand Down Expand Up @@ -1031,9 +1017,7 @@ export class TimelineModelImpl {
timelineData.warning = TimelineModelImpl.WarningType.IdleDeadlineExceeded;
}
break;

}

return true;
}

Expand Down

0 comments on commit d6d1629

Please sign in to comment.