Ability to log performance makers to ftrace for Tizen SPI tool
[platform/core/uifw/dali-adaptor.git] / adaptors / tizen / internal / 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 Flora License, Version 1.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://floralicense.org/license/
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 #include <base/interfaces/kernel-trace-interface.h>
21
22 namespace Dali
23 {
24
25 namespace Internal
26 {
27
28 namespace Adaptor
29 {
30
31 /**
32  * Concrete Kernel Tracing Interface.
33  * Used to log trace messages to the kernel using ftrace.
34  *
35  */
36 class KernelTrace : public KernelTraceInterface
37 {
38 public:
39
40   /**
41    * Constructor
42    */
43   KernelTrace();
44
45   /**
46    * Destructor
47    */
48   virtual ~KernelTrace();
49
50   /**
51    * @copydoc KernelTracerInterface::KernelTrace()
52    */
53   virtual void Trace( const std::string& traceMessage );
54
55 private:
56
57   int mFileDescriptor;
58   bool mLoggedError:1;
59
60 };
61
62 } // namespace Internal
63
64 } // namespace Adaptor
65
66 } // namespace Dali
67
68 #endif // __DALI_INTERNAL_ADAPTOR_KERNEL_TRACE_H__