mirror of
https://github.com/openharmony/linux_frame_aware_sched.git
synced 2026-07-19 17:23:36 -04:00
trace_add & log_delete & ui bugfix
Signed-off-by: rongkunshi <shirongkun@huawei.com>
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef RME_SCOPED_TRACE_H
|
||||
#define RME_SCOPED_TRACE_H
|
||||
|
||||
#include "bytrace.h"
|
||||
|
||||
#include <cstdarg>
|
||||
#include <cstdio>
|
||||
|
||||
#define RME_SCOPED_TRACE(fmt, ...) RmeScopedTrace rmeScopedTrace(fmt, ##__VA_ARGS__)
|
||||
#ifdef RME_DEBUG
|
||||
#define RME_DEBUG_SCOPED_TRACE(fmt, ...) RmeScopedTrace rmeScopedTrace(fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define RME_DEBUG_SCOPED_TRACE(fmt, ...)
|
||||
#endif
|
||||
|
||||
#define RME_FUNCTION_TRACE() RME_SCOPED_TRACE(__func__)
|
||||
|
||||
namespace OHOS {
|
||||
namespace RME {
|
||||
bool RmeTraceEnable();
|
||||
void RmeTraceBegin(const char* name);
|
||||
bool RmeTraceBeginWithArgs(const char* format, ...) __attribute__((__format__(printf, 1, 2)));
|
||||
bool RmeTraceBeginWithArgvs(const char* format, va_list args);
|
||||
void RmeTraceEnd();
|
||||
|
||||
class RmeScopedTrace final {
|
||||
public:
|
||||
explicit RmeScopedTrace(const char* format, ...) __attribute__((__format__(printf, 2, 3)));
|
||||
~RmeScopedTrace();
|
||||
|
||||
private:
|
||||
bool traceEnabled_ { false };
|
||||
};
|
||||
} // namespace RME
|
||||
} // namespace OHOS
|
||||
#endif
|
||||
@@ -89,8 +89,8 @@ extern "C"{
|
||||
int EnableRtg(bool flag);
|
||||
//-----for frame rtg-----//
|
||||
int CreateNewRtgGrp(int prioType = 0, int rtNum = 0); // Return GrpId if success
|
||||
int AddThreadToRtg(int tid, int grpId);
|
||||
int AddThreadsToRtg(vector<int> tids, int grpId);
|
||||
int AddThreadToRtg(int tid, int grpId, int prioType = 0);
|
||||
int AddThreadsToRtg(vector<int> tids, int grpId, int prioType = 0);
|
||||
int RemoveRtgThread(int tid);
|
||||
int ClearRtgGrp(int grpId);
|
||||
int DestroyRtgGrp(int grpId);
|
||||
|
||||
Reference in New Issue
Block a user