Patchwork [v7,02/11] trace: [tracetool] Remove unused 'sizestr' attribute in 'Event'

login
register
mail settings
Submitter Lluís Vilanova
Date March 21, 2012, 9:52 p.m.
Message ID <20120321215239.3272.92768.stgit@ginnungagap.bsc.es>
Download mbox | patch
Permalink /patch/148075/
State New
Headers show

Comments

Lluís Vilanova - March 21, 2012, 9:52 p.m.
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
---
 scripts/tracetool.py |   18 ------------------
 1 files changed, 0 insertions(+), 18 deletions(-)

Patch

diff --git a/scripts/tracetool.py b/scripts/tracetool.py
index 91ae351..33e3c26 100755
--- a/scripts/tracetool.py
+++ b/scripts/tracetool.py
@@ -89,23 +89,6 @@  def get_fmt(line, sep=')'):
     event, sep, fmt = line.partition(sep)
     return fmt.rstrip('\n')
 
-def calc_sizeofargs(line):
-    args = get_args(line)
-    argc = get_argc(line)
-    str = []
-    newstr = ""
-    if argc > 0:
-        str = args.split(',')
-        for elem in str:
-            if is_string(elem): #string
-                type, sep, var = elem.rpartition('*')
-                newstr = newstr+"4 + strlen("+var.lstrip()+") + "
-            else:
-                newstr = newstr + '8 + '
-    newstr = newstr + '0' # takes care of last +
-    return newstr
-
-
 def trace_h_begin():
     print '''#ifndef TRACE_H
 #define TRACE_H
@@ -426,7 +409,6 @@  class Event(object):
         self.name = get_name(line)
         self.argc = get_argc(line)
         self.argnames = get_argnames(line)
-        self.sizestr = calc_sizeofargs(line)
         self.fmt = get_fmt(line)
         self.properties = get_properties(line)