Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_43355755
engine
提交
f5683b99
E
engine
项目概览
weixin_43355755
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f5683b99
编写于
9月 23, 2016
作者:
C
Chinmay Garde
提交者:
GitHub
9月 23, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove the systrace logger. Dart can now redirect traces to systrace. (#3057)
上级
9eb446e0
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
0 addition
and
92 deletion
+0
-92
shell/common/BUILD.gn
shell/common/BUILD.gn
+0
-2
shell/common/systrace_logger.cc
shell/common/systrace_logger.cc
+0
-55
shell/common/systrace_logger.h
shell/common/systrace_logger.h
+0
-35
未找到文件。
shell/common/BUILD.gn
浏览文件 @
f5683b99
...
...
@@ -34,8 +34,6 @@ source_set("common") {
"shell.h",
"switches.cc",
"switches.h",
"systrace_logger.cc",
"systrace_logger.h",
"tracing_controller.cc",
"tracing_controller.h",
"ui_delegate.cc",
...
...
shell/common/systrace_logger.cc
已删除
100644 → 0
浏览文件 @
9eb446e0
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "flutter/shell/common/systrace_logger.h"
#include "lib/ftl/files/eintr_wrapper.h"
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
namespace
shell
{
static
const
int
kBufferSize
=
256
;
SystraceLogger
::
SystraceLogger
()
:
trace_fd_
(
HANDLE_EINTR
(
::
open
(
"/sys/kernel/debug/tracing/trace_marker"
,
O_WRONLY
))),
pid_
(
getpid
())
{}
SystraceLogger
::~
SystraceLogger
()
{
IGNORE_EINTR
(
::
close
(
trace_fd_
));
}
void
SystraceLogger
::
TraceBegin
(
const
char
*
label
)
const
{
char
buffer
[
kBufferSize
];
int
buffer_written
=
snprintf
(
buffer
,
sizeof
(
buffer
),
"B|%d|%s"
,
pid_
,
label
);
if
(
buffer_written
<=
0
||
buffer_written
>
kBufferSize
)
{
return
;
}
HANDLE_EINTR
(
::
write
(
trace_fd_
,
buffer
,
buffer_written
));
}
void
SystraceLogger
::
TraceEnd
()
const
{
HANDLE_EINTR
(
::
write
(
trace_fd_
,
"E"
,
1
));
}
void
SystraceLogger
::
TraceCount
(
const
char
*
label
,
int
count
)
const
{
char
buffer
[
kBufferSize
];
int
buffer_written
=
snprintf
(
buffer
,
sizeof
(
buffer
),
"C|%d|%s|%d"
,
pid_
,
label
,
count
);
if
(
buffer_written
<=
0
||
buffer_written
>
kBufferSize
)
{
return
;
}
HANDLE_EINTR
(
::
write
(
trace_fd_
,
buffer
,
buffer_written
));
}
}
// namespace shell
shell/common/systrace_logger.h
已删除
100644 → 0
浏览文件 @
9eb446e0
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SHELL_COMMON_SYSTRACE_LOGGER_H_
#define SHELL_COMMON_SYSTRACE_LOGGER_H_
#include "lib/ftl/macros.h"
#include <sys/types.h>
namespace
shell
{
class
SystraceLogger
{
public:
SystraceLogger
();
~
SystraceLogger
();
void
TraceBegin
(
const
char
*
label
)
const
;
void
TraceEnd
()
const
;
void
TraceCount
(
const
char
*
label
,
int
count
)
const
;
private:
int
trace_fd_
;
int
pid_
;
FTL_DISALLOW_COPY_AND_ASSIGN
(
SystraceLogger
);
};
}
// namespace shell
#endif // SHELL_COMMON_SYSTRACE_LOGGER_H_
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录