89722c565d13291cf3736cefd9140d309ead5792
[platform/core/uifw/dali-adaptor.git] / adaptors / common / kernel-trace.h
1 #ifndef __DALI_INTERNAL_ADAPTOR_KERNEL_TRACE_H__
2 #define __DALI_INTERNAL_ADAPTOR_KERNEL_TRACE_H__
3
4 /*
5  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 #include <base/interfaces/trace-interface.h>
22
23 namespace Dali
24 {
25
26 namespace Internal
27 {
28
29 namespace Adaptor
30 {
31
32 /**
33  * Concrete Kernel Tracing Interface.
34  * Used to log trace messages to the kernel using ftrace.
35  *
36  */
37 class KernelTrace : public TraceInterface
38 {
39 public:
40
41   /**
42    * Constructor
43    */
44   KernelTrace();
45
46   /**
47    * Destructor
48    */
49   virtual ~KernelTrace();
50
51   /**
52    * @copydoc KernelTracerInterface::KernelTrace()
53    */
54   virtual void Trace( const PerformanceMarker& marker, const std::string& traceMessage );
55
56 private:
57
58   int mFileDescriptor;
59   bool mLoggedError:1;
60
61 };
62
63 } // namespace Internal
64
65 } // namespace Adaptor
66
67 } // namespace Dali
68
69 #endif // __DALI_INTERNAL_ADAPTOR_KERNEL_TRACE_H__