Skip to contentSkip to conversation

abstract_cpu: do not call total_pstate_time() in validate()

PATCH In review Sergey Senozhatsky 4 participants 5 messages Sep 13, 2012 – Sep 14, 2012

lore
Share & tools
lore

Sergey Senozhatsky

author
#0 lore raw

PATCH 1/1 abstract_cpu: do not call total_pstate_time() in validate()

abstract_cpu: do not call total_pstate_time() in validate()

Signed-off-by Sergey Senozhatsky <sergey.senozhatsky(a)gmail.com>

---

 src/cpu/abstract_cpu.cpp | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
src/cpu/abstract_cpu.cpp +1 -6
index ebdc510..386d981 100644
@@ -414,15 +414,10 @@ uint64_t abstract_cpu::total_pstate_time(void)
 void abstract_cpu::validate(void)
 {
 	unsigned int i;
-	uint64_t my_time;
-
-	my_time = total_pstate_time();
 
 	for (i = 0; i < children.size(); i++) {
-
-		if (children[i]) {
+		if (children[i])
 			children[i]->validate();
-		}
 	}
 }
 
#1 lore raw
Quoted 20 lines · Sergey Senozhatsky

abstract_cpu: do not call total_pstate_time() in validate()

Signed-off-by Sergey Senozhatsky <sergey.senozhatsky(a)gmail.com>

---

  src/cpu/abstract_cpu.cpp | 7 +------
  1 file changed, 1 insertion(+), 6 deletions(-)
src/cpu/abstract_cpu.cpp +0 -3
index ebdc510..386d981 100644
@@ -414,15 +414,10 @@ uint64_t abstract_cpu::total_pstate_time(void)
  void abstract_cpu::validate(void)
  {
  	unsigned int i;
-	uint64_t my_time;
-
-	my_time = total_pstate_time();

src/cpu/abstract_cpu.cpp uint64_t abstract_cpu::total_pstate_time(void) · line 423

Quoted 10 lines
src/cpu/abstract_cpu.cpp +1 -3
 
  	for (i = 0; i < children.size(); i++) {
-
-		if (children[i]) {
+		if (children[i])
  			children[i]->validate();
-		}
  	}
  }
 

Your patch has been applied.
Thank You
-C

#2 lore raw
In reply to Sergey Senozhatsky

Dear Sergey,

Am Donnerstag, den 13.09.2012, 15:41 +0300 schrieb Sergey Senozhatsky:

Quoted 1 line

abstract_cpu: do not call total_pstate_time() in validate()

copying the commit summary into the commit message body is not useful.

Maybe also describe why this was a problem.

Quoted 6 lines
Signed-off-by Sergey Senozhatsky <sergey.senozhatsky(a)gmail.com>

---

 src/cpu/abstract_cpu.cpp | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

[…]

Thanks,

Paul

author
#3 lore raw
Quoted 10 lines · Paul Menzel

Dear Sergey,

Am Donnerstag, den 13.09.2012, 15:41 +0300 schrieb Sergey Senozhatsky:

Quoted 1 line

abstract_cpu: do not call total_pstate_time() in validate()

copying the commit summary into the commit message body is not useful.

Maybe also describe why this was a problem.

while I agree, this commit was not fixing any real problem (perhaps, meager performance impact), but just cleaned up abstract_cpu part after f77ea5fe2ad46b3c5de46b8447d23bd12958d2c8 commit:

- if (my_time != children[i]->total_pstate_time())
- printf("My (%i) time %llu is not the same as child (%i) time %llu\n",

-                                       first_cpu,
-                                       (unsigned long long)my_time,
-                                       children[i]->number,
-                                       (unsigned long long)children[i]->total_pstate_time());

for such trivial commits I usually cut corners since commit does what the summary says. may be I should be more accurate.

	-ss
#4 lore raw
In reply to Paul Menzel
Quoted 7 lines · Paul Menzel

Dear Sergey,

Am Donnerstag, den 13.09.2012, 15:41 +0300 schrieb Sergey Senozhatsky:

Quoted 1 line

abstract_cpu: do not call total_pstate_time() in validate()

copying the commit summary into the commit message body is not useful.

you do need to do that... it needs to be part of the git commit

Quoted 2 lines

Maybe also describe why this was a problem.

having more than the summary is often useful yes ;-)